Hi! Could we please enable some services and cookies to improve your experience and our website?
Online Sandbox for SQL and PHP: Write, Run, Test, and Share SQL Queries and PHP Code
<?php
$start1 = 10;
$start2 = 20;
$start3 = 30;
$start4 = 40;
$start5 = 50;
//get all defined vars
$vars = get_defined_vars();
foreach($vars as $var=>$val) {
if (substr($var, 0, 5) == 'start') {
printf('$%s = %s '. PHP_EOL, $var, $val);
}
}