Today we will talk a little about JSON.
When it comes to Webservices communication, JSON is pretty much becoming the format of choice (the Rock Star! if i may) for many services/users. This preference is due to many reasons, mainly that it is lighter than it’s step sister (or brother) XML.
Let’s take this simple [...]
Arrays are awesome. They are one of the easiest and most basic collection objects that you can use.
You probably know the basic form of an array. integer-index based:
array[0] = ‘hello arrays!’;
However you can also use more descriptive identifiers.
Say for example you want to create an array to represent a product, [...]
Saving the state of an object to your session can be very useful, and can be accomplished by using a combination of the serialize/unserialize functions.
class.php
<?php class warebot { //class implementation function warebot(){} } ?>
class.php has our simple class definition/implementation.
page1.php
<?php session_start(); require_once(‘class.php’); $object = new warebot(); $_SESSION['object'] = serialize($object); ?>
[...]
