Forum Moderators: coopster

Message Too Old, No Replies

Easy PHP question

         

andrewsmd

1:22 pm on Sep 17, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I want to kill a function but not my whole script. I'm sure there is a function for that I just can't find it. Does anyone know what it is? My logic would be something like this

function check(){
if($someVariable){

//exit the function but keep the script running

}//if

else{

//do some code
echo("we ran the function");

}//else
}//check

echo("Script still running");

I would like to always see script still running but only see we ran the function if $someVariable is not true. Thanks

penders

2:22 pm on Sep 17, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



You want to return [uk2.php.net] from your function.

andrewsmd

2:35 pm on Sep 17, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Ha, I feel like a complete idiot now. I have php classes that winzip, rename, move, archive, search and display, separate, and split files but I couldn't think to return. Total brain fart. Thanks,

penders

11:31 pm on Sep 17, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



No worries :)