Answers for "parameter in php"

PHP
3

php variable parameters

<?php
    function some_func($a, $b) {
        for ($i = 0; $i < func_num_args(); ++$i) {
            $param = func_get_arg($i);
            echo "Received parameter $param.\n";
        }
    }

    function some_other_func($a, $b) {
        $param = func_get_args();
        $param = join(", ", $param);
        echo "Received parameters: $param.\n";
    }

    some_func(1,2,3,4,5,6,7,8);
    some_other_func(1,2,3,4,5,6,7,8);
?>
Posted by: Guest on September-26-2020
0

get parameter php

<a href="index.php?id=<?php echo $my_id;?>&name=<?php echo $my_name;?>Click</a>

<?php
$id = intval($_GET['id']);		// integer value
$name = strval($_GET['name']);	// string value
?>
Posted by: Guest on May-09-2021

Browse Popular Code Answers by Language