Archive for August 6th, 2007

Nick Halstead’s Blog: Reverse Polish Notation in PHP

As a follow up to a previous post where he discussed reverse polish notation, Nick Halstead has decided to split off the code he created for that previous post into a new, sleeker post without much of the explanation and heavy on the code.

My last post about back to basics covered reverse polish notation including a link to a RPN parser which I wrote to allow people to learn by example (best way in my opinion and in yours). The post got quite long and the PHP code was not really relevant to the subject so I have decided to include in this separate post instead.

There’s two parts to the post - a pseudo-code explanation that an overview of how things work and the actual code, a block of code (in the 30 line area) that runs through each item and, based on a token, pushes the value into the array differently.

Continue Reading · Add comment

Jonathan Street’s Blog: Elsewhere…New PEAR package for the Compete API

In a new post Jonathan Street mentions a new PEAR package that’s an API for the Compete API:

After writing about the compete API Hiroki Akimoto contacted me mentioning a proposal he had made to PEAR. Our scripts each had strengths and we decided to combine our attempts and hopefully make something better. After a week or so we updated the proposal with the new code and after a little time for comments and a week for voting the proposal was accepted and on 30th July a new package, Services_Compete, was available on PEAR

This package (currently in an alpha release, version 0.1.0) acts as a wrapper class to connect to and use the Compete SnapShot API.

Continue Reading · Add comment

Zend Developer Zone: Paging Data Sets With PEAR Pager

On the Zend Developer Zone today, there’s a new tutorial covering the use of the PEAR Pager class to break sets into smaller sets for all sorts of data sets (not just database results).

PEAR’s Pager class, [which] offers developers a framework for breaking large data sets into smaller chunks, or pages, for greater readability or easier navigation. Pagination is important, particularly when dealing with result sets containing hundreds or thousands of items, because it allows the user to exert some degree of control over which segment of the data set is visible at any given point, and thus avoid drowning in a never-ending sea of data.

Cal explores the functionality this powerful little class has under the hood including working with pagination of normal arrays, database results and XML information. Of course, code is provided through out and screenshots are posted where needed to show what the output should look like.

Continue Reading · Add comment

ParanoidFerret.com: Using Flex, PHP, and JSON to Modify a MySQL Database

ParanoidFerret.com is back with another Flex and PHP article today and this time, some other friends are joining in - JSON and MySQL.

To follow-up on the Flex and PHP tutorial we did earlier I thought it would be nice to do a complete tutorial on php, mysql, flex, and json. This tutorial should show a decent way to send data in a database to and from flex to php using json. I will explain this in more detail in just a moment.

Included in the tutorial is a sample of the end result and all of the code you’ll need - the database setup, the PHP code to connect to it and pass along the JSON message content, and the Flex/code XML to handle the creation of the requests and update the data in the app according to the response.

Continue Reading · Add comment

Carsten Lucke’s Blog: Debugging PHP with free tools (PDT + XDebug2)

Carsten Lucke lists out a a combination of tools he’s found that can make debugging your PHP applications a simple task - both for free.

I figured out that the PHPEclipse people were developing a plugin to use XDebug but there didn’t seem to be much progress. So I stopped my efforts on free remote-debugging. Some weeks ago XDebug2 was released and I decided to give the remote-debugging thing one more shot. I tried PDT + XDebug2 and guess what - it worked out fine!

He includes a brief overview of what you’ll need and how to get it installed, but you’ll still need to be a bit familiar with how Eclipse and the XDebug software work to get things running smoothly.

Continue Reading · Add comment