<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Wed, 22 May 2013 19:56:49 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[PHPBuilder.com: PHP Arrays: Advanced Iteration and Manipulation]]></title>
      <guid>http://www.phpdeveloper.org/news/17238</guid>
      <link>http://www.phpdeveloper.org/news/17238</link>
      <description><![CDATA[<p>
In <a href="http://www.phpbuilder.com/columns/php_arrays/PHP_Arrays_12-8-2011.php3">this new tutorial</a> from PHPBuilder.com, <i>Jason Gilmore</i> shows you some of the more advanced things you can do with arrays in PHP (specifically in the areas of iterating through them and manipulating their contents).
</p>
<blockquote>
Sporting more than 70 native array-related functions, PHP's array manipulation capabilities have long been one of the language's most attractive features. [...] There are however many array-related tasks which ask a bit more of the developer than merely knowing what part of the manual one needs to consult. Many such tasks require a somewhat more in-depth understanding of the native features, or are possible only when a bit of imagination is applied to the problem.
</blockquote>
<p>
In his examples he shows how to do things like sorting a multi-dimensional array, iterating recursively (with the help of a <a href="http://www.php.net/manual/en/class.recursivearrayiterator.php">RecursiveArrayIterator</a>), converting an object to an array and doing "natural" sorting on an array's contents.
</p>]]></description>
      <pubDate>Fri, 09 Dec 2011 12:50:11 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Davey Shafik's Blog: DateTime Timestamp Parsing]]></title>
      <guid>http://www.phpdeveloper.org/news/16882</guid>
      <link>http://www.phpdeveloper.org/news/16882</link>
      <description><![CDATA[<p>
In a new post to his blog <i>Davey Shafik</i> looks at <a href="http://daveyshafik.com/archives/28101-datetime-timestamp-parsing.html">parsing dates with DateTime</a>, the <a href="http://php.net/datetime">new and improved</a> way to handle dates in PHP (well, not so new but definitely improved).
</p>
<blockquote>
As part of a recent project, I was tasked with taking timestamps returned by an API and displaying fuzzy dates in the final output (e.g. 3hrs ago, in 2 weeks, tomorrow). The timestamp format in question looks like: 2012-09-01T16:20:01-05:00 This format can be found in PHP as the DATE_ATOM or DateTime::ATOM constants, which contain the date() formatter string: Y-m-dTH:i:sP With this in hand, we can now easily parse the timestamp into a useful object.
</blockquote>
<p>
Parsing the date into a DateTime object is as easy as giving it the date string and telling it how it's formatted. Then you can do all sorts of fun things. He shows how to shift the timezone by name, by time increment - simple (like "1 hour") and more complex (like "1 hour 5 minutes 3 seconds"). You can find out more about the DateTime object <a href="http://php.net/datetime">in the PHP manual</a>.
</p>]]></description>
      <pubDate>Tue, 20 Sep 2011 11:24:27 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPBuilder.com: 10 PHP Tricks for Associative Array Manipulation]]></title>
      <guid>http://www.phpdeveloper.org/news/15569</guid>
      <link>http://www.phpdeveloper.org/news/15569</link>
      <description><![CDATA[<p>
On PHPBuilder.com there's <a href="http://www.phpbuilder.com/columns/associative-array-manipulation/Jason_Gilmore12092010.php3">a new tutorial</a> with ten handy tips you can use to work with associative arrays in your PHP applications.
</p>
<blockquote>
The associative array -- an indispensable data type used to describe a collection of unique keys and associated values -- is a mainstay of all programming languages, PHP included. [...] Such extensive support can be a bit overwhelming to developers seeking the most effective way to manipulate arrays within their applications. In this article, I'll offer 10 tips that can help you shred, slice and dice your data in countless ways.
</blockquote>
<p>His tips include working with the arrays by:</p>
<ul>
<li>Adding Array Elements
<li>Swapping Keys and Values
<li>Editing Array Values
<li>Randomizing Array Order
<li>Searching the Array
</ul>]]></description>
      <pubDate>Mon, 13 Dec 2010 11:54:34 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPBuilder.com: 10 Easy Solutions for PHP String Manipulation]]></title>
      <guid>http://www.phpdeveloper.org/news/14598</guid>
      <link>http://www.phpdeveloper.org/news/14598</link>
      <description><![CDATA[<p>
If you're relatively new to the PHP language and want a few handy tips on working with strings, you should check out this <a href="http://www.phpbuilder.com/columns/Jason_Gilmore060210.php3">list of ten things</a> that <i>Jason Gilmore</i> has put together to help you with some common string manipulations.
</p>
<blockquote>
PHP's capabilities [string manipulation] are so strong that it can sometimes be difficult to determine the best possible approach for accomplishing a particular string-related task. In this article I highlight the ideal solutions to 10 common string manipulation tasks.
</blockquote>
<p>
Among the methods in his list of transformations, he includes:
</p>
<ul>
<li>Truncating Text to Produce a Summary
<li>Parsing a CSV File
<li>Converting URLs into Hyperlinks
<li>Converting Newline Characters to Break Tags
</ul>]]></description>
      <pubDate>Thu, 03 Jun 2010 10:04:32 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Michael Maclean's Blog: Handling fonts in PECL/Cairo]]></title>
      <guid>http://www.phpdeveloper.org/news/14116</guid>
      <link>http://www.phpdeveloper.org/news/14116</link>
      <description><![CDATA[<p>
<i>Michael Maclean</i> has a look at <a href="http://mgdm.net/weblog/handling-fonts-in-peclcairo">working with fonts in Cairo</a> (a graphics manipulation extension in the <a href="http://pecl.php.net/package/cairo">PECL repository</a>). The example will be added to the PHP manual too in case you need it for reference later.
</p>
<blockquote>
Currently, in PECL/Cairo the only way to draw text is the referred to as the "toy" text API, which is a very basic way of handling text compared to the facilities available in the Cairo library itself. However, it's sufficient for most purposes that I've come across so far. 
</blockquote>
<p>
With the first versions of the Cairo extension, you had to use the <a href="http://www.php.net/manual/en/cairocontext.selectfontface.php">selectFontFace</a> method to choose the font you wanted. With the introduction of Cairo 0.2.0, you can now use FreeType font support instead and can use the streams API built into PHP to locate the resource. A snippet of code is included to show how that would work.
</p>]]></description>
      <pubDate>Tue, 02 Mar 2010 12:42:43 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Sameer Borate's Blog: Easy manipulation of URLs]]></title>
      <guid>http://www.phpdeveloper.org/news/13510</guid>
      <link>http://www.phpdeveloper.org/news/13510</link>
      <description><![CDATA[<p>
On his codediesel.com blog today <i>Sameer Borate</i> has <a href="http://www.codediesel.com/pear/easy-manipulation-of-urls-in-php/">a quick post</a> looking at URL manipulation with the help of the <a href="http://pear.php.net/package/Net_URL2/">Net_URL2</a> PEAR package.
</p>
<blockquote>
Whether you are dynamically creating urls or changing existing ones, manipulation of urls is a frequent coding requirement during development; doing the same on short urls is easy, but quickly becomes complex for urls which have larger query parameters.
</blockquote>
<p>
He shows how to use the package to parse the current URL into its respective parts (host, port, path, etc) and how to automatically change certain parameters in the current URL and push the updated version back out the other side. There's also a bit there at the end on normalizing URLs.
</p>]]></description>
      <pubDate>Tue, 10 Nov 2009 12:48:49 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Kae Verens' Blog: php and jquery chp7: image manipulation]]></title>
      <guid>http://www.phpdeveloper.org/news/12903</guid>
      <link>http://www.phpdeveloper.org/news/12903</link>
      <description><![CDATA[<p>
<i>Kae Verens</i> has <a href="http://verens.com/archives/2009/07/18/php-and-jquery-chp7-image-manipulation/">a new post</a> to his blog looking at a form of non-destructive image manipulation - using the URL of the request to determine the changes that need to be made.
</p>
<blockquote>
The solution is to not actually create copies, but to record the changes applied to the original image in the URL of your manipulated image. When the server is asked for those URLs, it runs the manipulations on the original image and gives you back the new image. Of course, we will cache the new manipulations so this doesn't need to be done every time, but this now allows you to replace the original image, then clear the cache, forcing all the variants of it to refresh, without you needing to do it again.
</blockquote>
<p>
<a href="http://verens.com/demos/php_and_jquery/7-6-cropping/images.php">A demo</a> of the script in action is included in the post as well as <a href="http://verens.com/demos/php_and_jquery/7-image-manipulation.tar.gz">a link to download</a> the script doing the work.
</p>]]></description>
      <pubDate>Mon, 20 Jul 2009 09:17:48 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Ajaxray.com: Image manipulation in Zend Framework using PHP Thumbnailer Class v2.0]]></title>
      <guid>http://www.phpdeveloper.org/news/11079</guid>
      <link>http://www.phpdeveloper.org/news/11079</link>
      <description><![CDATA[<p>
In <a href="http://www.ajaxray.com/blog/2008/09/12/image-manipulation-in-zend-framework-with-php-thumbnailer-class-v20/">this recent post</a> to the Ajaxray blog <i>Anis Ahmad</i> shows how to use the PHP Thumbnailer class inside of a Zend Framework application.
</p>
<blockquote>
In the huge set of library, <a href="http://framework.zend.com/">Zend Framework</a> have no options for manipulating image. There is a proposal for <a href="http://framework.zend.com/wiki/display/ZFPROP/Zend_Image+Proposal+-+Davey+Shafik">Zend_Image</a> which aimed to provides easier image manipulation using GD. But the proposal was not considered. [...] So, what to do when we need to make image thumbnail, resizeing or cropping image etc in Zend Framework?
</blockquote>
<p>
He shows how to integrate the <a href="http://www.gen-x-design.com/projects/php-thumbnailer-class/">Thumbnailer class</a> with the Framework - making it a library and implementing it within a controller (a private function called _createThumbnail).
</p>]]></description>
      <pubDate>Wed, 24 Sep 2008 11:12:18 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Debuggable Blog: String substitution using UUIDs]]></title>
      <guid>http://www.phpdeveloper.org/news/10883</guid>
      <link>http://www.phpdeveloper.org/news/10883</link>
      <description><![CDATA[<p>
On the Debuggable blog, <i>Felix Geisendorfer</i> shows how to <a href="http://www.debuggable.com/posts/string-substitution-using-uuids:48ad0e84-7c80-4bfd-b6be-4e8d4834cda3">create a string parser</a> that allows you to pull out parts of the string you don't currently want manipulated to be put back later.
</p>
<blockquote>
If you've ever written any non-trivial String processing code, you've probably ran into the situation where you wanted to exclude certain parts of your string for a certain operation. Usually that would mean you have to tokenize your string, or adjust the operation you want to run so it doesn't affect the part of the string you want to exclude from it. Both of those solutions can be fairly time intensive so I was looking for a shortcut and found one.
</blockquote>
<p>
He provides the code for this string substitution class, a method substitute() that matches based on a regular expression and, if found, stores the parts for later use.
</p>]]></description>
      <pubDate>Fri, 22 Aug 2008 12:04:39 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[DevShed: Building an Image Generator Class with PHP 5]]></title>
      <guid>http://www.phpdeveloper.org/news/8758</guid>
      <link>http://www.phpdeveloper.org/news/8758</link>
      <description><![CDATA[<p>
In a <a href="http://www.devshed.com/c/a/PHP/Building-an-Image-Generator-Class-with-PHP-5/">new tutorial</a> today from DevShed, they introduce you to one of the more powerful bits of PHP functionality - the graphics manipulation functions - and how to use them to create an image generator class in PHP5.
</p>
<blockquote>
In simple terms, over the course of this brand new PHP series, which will be comprised of three friendly tutorials, I'll walk you through the development of an easy-to-follow PHP class that will have the ability to build dynamic text strings, which will be outputted straight to the browser in the form of image streams.
</blockquote>
<p>
This part part of the series lays the foundation, creating the <a href="http://www.devshed.com/c/a/PHP/Building-an-Image-Generator-Class-with-PHP-5/1/">basic structure</a> of the class and the buildImageStream and displayImage methods. This is then used in a sample use - creating images, white text on a black background.
</p>]]></description>
      <pubDate>Mon, 01 Oct 2007 12:57:00 -0500</pubDate>
    </item>
  </channel>
</rss>
