MySQL Forums
Forum List  »  PHP

Split memo function
Posted by: Luke Harding
Date: March 24, 2006 07:01AM

Help! I want to be able to split a memo within my php page created within dreamweaver, using a function. However, the below funtion does not appear to work. Would be grateful if someone could point me in the right direction.

Many thanks
Luke


-------------------------------------------
?php function splitMemo($memo)
$parts = splitMemo($row_HP['Description']);
{
$retVal = array();
// find first space after 100 characters
$pos = strpos($memo, ' ', 100);
// extract first and second halves
$retVal[0] = substr($memo, 0, $pos);
$retVal[1] = substr($memo, $pos+1);
// return array of both halves
return $retVal;
}
echo $parts[0];
?>

Options: ReplyQuote


Subject
Written By
Posted
Split memo function
March 24, 2006 07:01AM
March 27, 2006 07:41PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.