You are here: Function not returning « All PHP « IT news, forums, messages
Function not returning

Posted by Mike on 07/17/06 08:09

I have the following 2 scripts...

//functions.php
<?php
function test($mike) {
if ($mike = "hello"){
$reply = "you said hello";
return $reply;
} else {
$reply = "you didn't say hello";
return $reply;
}
}
?>

//test.php
<?php
include("functions.php");
$mike = "hello";
test($mike);
echo $reply;
?>

When I run test.php I don't get anything, blank screen.

What would I be doing wrong?

Thanks Mike

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация