php - online server wont show string values -
i have code, array , make string, on localhost show values correctly (1,2...) on online server shows (,,) no numbers, commas. know issue may be?
heres code
<?php error_reporting(e_all); conection $sql = "select id table id=1"; $result = mysql_query( $sql); $myarray= array() ; //here must declare array while($row = mysql_fetch_array($result)){ $popurl = $row['id ']; $myarray[] = $popurl; } $string = "" . implode(", ", $myarray) . "" ; echo $string; ?>
please need help
it's simple typo problem:
$row['id ']
not defined. correct $row['id']
, should fine.
Comments
Post a Comment