Posted by Chad Ayers on June 4, 2010
The following code returns a bool value of true or false:
<?
class Books
{
public function read()
{
}
public function find()
{
}
}
$class = new Books();
$function = "find";
$methodVariable = array($class, $function);
$function_exists = var_dump(is_callable($methodVariable));
echo $function_exists;
?>
Live example of above code.
Posted by Chad Ayers on June 2, 2010
HTML Code:
<html>
<body>
<form action="multiEmail.php" method="post">
<select name="to">
<option value="a@a.com">a@a.com</option>
<option value="b@b.com">b@b.com</option>
<option value="c@c.om">c@c.com</option>
<option value="d@d.com">d@d.com</option>
</select>
<input name="Submit" type="submit" value="Submit" />
</form>
</body>
</html>
PHP Code:
<?
$to = $_POST['to'];
echo $to;
?>
Live example of above code.
Posted by Chad Ayers on June 2, 2010
<?
$startDate = "2010-06-02";
$nextDate = strtotime($startDate. "+2 week");
$format = '%Y-%m-%d';
echo strftime($format,$nextDate);
?>
Live example of above code.