passing variable value through php function not working -
i trying pass value of $page="somepage"; throught function suppose
function example($page) { echo $page; ?> <input type="radio" name="smoke" value="y"> yes <input type="radio" class="ml_10" name="smoke" value="n"> no <input type="radio" class="ml_10" name="smoke" value="o"> <?php } example ($page); when try echo page should come somepage instead coming 1. if manually write page while calling functions prints right eg example ("somepage").
your $page variable contains number 1 before calling example() function
so, have make contain "somepage" value instead.
or
your example() function contains code converts "somepage" 1.
most
$page = include $page; line omit question unknown reason
either way question being localized , not suitable stack overflow
Comments
Post a Comment