Say, I've got the following code in PHP:
included_file.php:
DEFINE("MSWFFN",serialize(array(
"mnu"=>array("n"=>"topmnu.swf","w"=>"980px","h"=>"80px","i"=>"mnu","p"=>"&subp=home")
)));
main_file.php:
require_once("included_file.php");
global $MSWFFN;
$MSWFFN=unserialize(MSWFFN);
$swf=array_slice($MSWFFN,0,1,false); //first swf from cfg
var_dump($MSWFFN);
var_dump($swf);
Based on what's said [in this question][1] and on the [php website][2] it should return an array with integer keys, but it does not.
Any idea on why does it not change the 'mnu' key to 0?
Output:
array (size=1)
'mnu' =>
array (size=5)
'n' => string 'topmnu.swf' (length=10)
'w' => string '980px' (length=5)
'h' => string '80px' (length=4)
'i' => string 'mnu' (length=3)
'p' => string '&subp=home' (length=10)
array (size=1)
'mnu' =>
array (size=5)
'n' => string 'topmnu.swf' (length=10)
'w' => string '980px' (length=5)
'h' => string '80px' (length=4)
'i' => string 'mnu' (length=3)
'p' => string '&subp=home' (length=10)
Oh, btw my Apache Version is Apache/2.2.23 (Win32) PHP/5.3.18 (VertrigoServ v2.29) [1]: PHP: Get n-th item of an associative array [2]: https://www.php.net/manual/en/function.array-slice.php