note 80177 added to ref.array

From: Date: Wed, 02 Jan 2008 23:53:20 +0000
Subject: note 80177 added to ref.array
Groups: php.notes 
Request: Send a blank email to php-notes+get-134670@lists.php.net to get a copy of this message
if some one will need to convert array to php code use this function: DEFINE('OFFSET_DELIMETER', "\t"); function array2php($array, $offset = OFFSET_DELIMETER) { $text = ''; foreach($array as $k => $v) { if (is_array($v)) { $text .= "{$offset}'{$k}' => array(\n".array2php($v, $offset.OFFSET_DELIMETER)."$offset)"; } else { $text .= "{$offset}'{$k}' => ".(is_string($v)? "'$v'": $v); } $text .= ",\n"; } if ($len = strlen($text)) $text[$len - 2] = " "; return $text; } ---- Server IP: 91.196.196.241 Probable Submitter: 92.112.73.57 ---- Manual Page -- http://www.php.net/manual/en/ref.array.php Edit -- https://master.php.net/note/edit/80177 Del: integrated -- https://master.php.net/note/delete/80177/integrated Del: useless -- https://master.php.net/note/delete/80177/useless Del: bad code -- https://master.php.net/note/delete/80177/bad+code Del: spam -- https://master.php.net/note/delete/80177/spam Del: non-english -- https://master.php.net/note/delete/80177/non-english Del: in docs -- https://master.php.net/note/delete/80177/in+docs Del: other reasons-- https://master.php.net/note/delete/80177 Reject -- https://master.php.net/note/reject/80177 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#134670) next »