Xub Yubzub
New member
<?php
function reverseIt(&$strString) {
$strString = strrev($strString);
}
$strName = "Simon";
echo "<p>$strName ";
reverseIt($strName);
echo "reversed is $strName</p>";
?>
it works with the '&' but without it it just says 'Simon reversed is Simon' instead of 'Simon reversed is moniS'.
It's from the book 'Dynamic Web Application Development using PHP and MySQL' by Simon Stobart and David Parsons on pg.386 if that's any help.
function reverseIt(&$strString) {
$strString = strrev($strString);
}
$strName = "Simon";
echo "<p>$strName ";
reverseIt($strName);
echo "reversed is $strName</p>";
?>
it works with the '&' but without it it just says 'Simon reversed is Simon' instead of 'Simon reversed is moniS'.
It's from the book 'Dynamic Web Application Development using PHP and MySQL' by Simon Stobart and David Parsons on pg.386 if that's any help.