Re: Redefine Funtion

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Dec 1, 2015 07:23, "Ethan Rosenberg" <erosenberg@xxxxxxxxxxxxxxxxxxxx>
wrote:
>
> Dear List -
>
> Thanks for all your help with my previous question.
>
> This works -
>
>       $output = shell_exec('php P7a.php');
>       echo $output;
>
> Now another question -
>
>     function SetParameters()
>     {
>      etc......
>     }
>
>         switch ($_POST['next_step'])
>         {
>
>                 case 'step1':
>                 {
>
>                         SetParameters();
>                         Choice();
>                         break;
>
>                 }
>         } //end switch
> // yes, there are more cases, and I have checked for mismatched
parenthesis and have not found //any.
>
> Fatal error: Cannot redeclare SetParameters() (previously declared in
/var/www/P7a.php:109) in /var/www/P7a.php on line 180
>
> ???
>
> TIA
>
> Ethan
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

SetParameters() function is defined inside a function I am guessing. So
either keep it out of the function which is called twice or check if
function_exists before defining.

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux