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;
Also in PHP:
- datetime format php datetime
- explode in php
- date now in php
- disable registration laravel
- add page nos. to existing pdf in php
- element has key in an array
- intval php
- current domain in php
- add day to php date zero to add 10 below add zero
- check if substring is present in string php
- alphabet and numeric random php
- !array_key_exists($id, $this->items)
- artisan create seeder
- create laravel new project
- add php var to js console log
- date formate function in php
- check if php string contains
- age date de naissance php
- delete cache on host laravel
- alias seeddb='php artisan db:seed'
- check same and differnt value in array in php
- count length of string pphp
- change datetime format from Y-m-d h:i:s to d-m-Y in php
- echo type php