Zephir is an open source, high-level language designed to ease the creation and maintainability of extensions for PHP, with a focus on type and memory safety.
Below, I’ve created a very simple view template class. Similar to the ever popular Smarty framework, although not nearly as big or feature rich. Typically you would use this to separate design from code (mvc pattern), which makes things much easier to manage over time. Another use for…
The following is derived from my post on the (now defunct) hawkee.com forums.
This is a hot topic for those just getting into php. Understanding the difference between print() and echo can be challenging for those unfamiliar with the language.
print()
echo
This is a simple pagination snippet I wrote for a Drupal module I was working on. I’ve “unDruaplized” it and now it’s completely independent.
The function will calculate the number of pages to display based on $total and $shown. In addition, it'll append the…
$total
$shown