Tag Archives: array

PHP stdClass to Array and Array to stdClass Object

PHP stdClass to Array and Array to stdClass Object




I think every PHP coders have come accross Arrays and stdClass Objects (belongs to PHP Predefined Classes). Sometimes it’s very useful convert Objects to Arrays and Arrays to Objects. This is easy if arrays and objects are one-dimensional, but might be little tricky if using multidimensional arrays and objects. This post defines two ultra simple recursive function to convert multidimensional Objects to Arrays and multidimensional Arrays to Objects. Function to Convert stdClass Objects to Multidimensional Arrays

Codeigniter Template Library

Codeigniter Template Library




I am not only a Codeigniter fun but also WordPress fun. So I try to crate a CI template library that look like WordPress theme. I have got this library and it will be used with the helper together. By using this library, you can crate the themes like in WordPress. Requirement Codeigniter 2.0.0 and above Installing Copy and paste below code in your new document and save as ./application/libraries/Template.php

Admin Menus in WordPress

Admin Menus in WordPress




The administration system in WordPress works well enough at first glance. The built-in menu functions take care of a lot of the issues such as adding and removing menu items, but you may want to learn more about how WordPress handles its menus internally to leverage more control. The example below will show how you can implement a plugin which enables you to reorder the menu items in the order you wish while explaining the nuances of the WordPress menu […]

Form Validation with PHP

Form Validation with PHP




In this article you’ll construct and validate a simple form using HTML and PHP. The form is created using HTML and validation and processing of the form’s contents is done with PHP. The goal is to teach you some basic HTML form elements and how their data is accessible to you in your PHP scripts. The form you’ll create contains a number of inputs: text fields, radio buttons, a multiple-option select list, a checkbox, and a submit button. These inputs […]

PHP 5.4 is Released




It’s difficult to believe almost three years have elapsed since PHP 5.3.0. The next version should have been PHP 6.0 but unicode problems have delayed development. This latest version provides many of the features planned for version 6.0. PHP 5.4 is available to download from the php.net website. There’s a PHP 5.3 migration guide if you want to keep your old settings. While it’s stable, you’d be advised to test your sites and applications before installing it on live servers. […]