Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

Using a variable outside of the while loop (scope)

#How to use a variable outside of the while loop (scope)

#You could try to define the variable before the loop, e.g.

$report = "";
while ($row = mysql_fetch_array($result)) {
    $report .= $row["prevDOCid"];
}
echo $report;
 
PREVIOUS NEXT
Tagged: #Using #variable #loop
ADD COMMENT
Topic
Name
2+4 =