Jump to content

keys %online php translation help


pcw

Recommended Posts

Hi,

 

I am trying to convert an old perl script into php. And am stuck on the following code.

 

elseif (preg_match_all("m/^ONLINE:(.*)$/", $part))

{

if(!defined($online)){

get_online();

}

$out .= implode($v1);

map ("<a href=sb.php?action=display&login=$_&session=$input['session']>$_</a>") # This is line 426

 

keys %online;  # This is line 428

}

 

When I do a syntax check, I get the following errors:

 

Parse error:  parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in sb.php on line 426

 

and

 

Parse error:  parse error, unexpected T_STRING in sb.php on line 428

 

I cant seem to work out a translation into PHP, any help is much appreciated  :)

 

Link to comment
https://forums.phpfreaks.com/topic/146097-keys-online-php-translation-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.