FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


howto: Array ??





avk
Hello

I just want to change

Code:

<?php
$array = array("size" => "XL", "color" => "gold");
?>


TO

Code:

<?php
$array = array( "color" => "gold","size" => "XL");
?>


What should i do to do this.

Tried the sorting function and the array_reverse function too but didn't come up with the right results.

What to do??
kv
array_reverse should work. Just keep in mind that array_reverse returns a new array and does not change the original array. so

Code:


$arr = array_reverse($arr, true);



and don't use "array" as a variable. It is a keyword in php.
avk
OK

this may Work.

I will try it.
Related topics
[php] array reference
how to accept array variable from a form in Perl
how to handle post data as an array
PHP Calendar Bug
passing javascript array
C program with 3D array, in Linux
changing Array format from result of MySQL
take out repeat data in array
handling the $_POST array
Howto stream video?
php multidimension array question
Actionscript Problem: array failure?
array question
Help installing Fedora Core 6
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.