PHP Fatal error: Call to undefined function: array()
| From: | Jim MacDiarmid | Date: | Thu, 04 Mar 2004 23:18:04 +0000 |
| Subject: | PHP Fatal error: Call to undefined function: array() | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-23062@lists.php.net to get a copy of this message | ||
I'm getting the above error when either attempting to print or assign
the value of a array element to a variable, after using preg_match().
=== Watch for text wrapping ===
$URL_Filter =
"/\s+Trav[0-9]\.([a-zA-Z0-9\:\/\/\.]+)\.\.[a-z0-9]+\sHAS\s([0-9]+)\sspac
es?/";
foreach ($outArray as $line){
$out = array();
if ( preg_match( "/spaces?/", $line) > 0) {
preg_match( $URL_Filter, $line, $out); //Parse Space
URL and Space Count
//print "<pre>";
//print_r($out);
//print "</pre><br>";
//reset($out);
print $out(1); <-- Error occurs here
print $out(2);
// if ( $SpaceCount >= 1 ){
// echo $SpaceUrl;
// for ($i=0; $i >= $SpaceCount; i++ )
// print $i;
// }
}
}
Anyone know what's going on here?
Thanks,
Jim