a simple way to convert array to object in PHP
[PHP]
0)
{
foreach ($array as $name=>$value)
{
$name = strtolower(trim($name));
if (!empty($name))
{
$object->$name = $value;
}
}
}
return $object;
}
[/PHP]
http://forum.weblivehelp.net/web-development/php-convert-array-object-and-vice-versa-t2.html
Ads
-
-
Recent Posts
-
Popular Posts
- Creating mobile applications with Dreamweaver CS 5.5 and PhoneGap
- Flash Player for Nokia E5, 5235, E63…
- Accessing the camera phone with Adobe AIR for Android
- Getting Started with AIR for iOS
- Flash Player 10.2 available for mobile devices
- Get streaming from IP Camera to Flash Media Server with FFmpeg
- Using the Update Framework for Adobe AIR
- Integrating Flex with Java using BlazeDS – first steps
- Motion Detection Webcam with Adobe Flash
- IP Camera and Adobe Flash