The Flash and PHP Bible has been released! The book can be found on Amazon or wherever fine books are sold in your area. This book explains the process of working with PHP in Flash, while creating real world examples that you can actually learn something from.
The Flash and PHP Bible has a dedicated forum for support and comments.
Use this function to split a string per character. The function takes the string and a line ending as parameters.
Use this function to split a string per character.
<?php
function outputString($str, $line_end)
{
// Set the variable that holds the string
$str = "";
// Use a for loop to grab each character
for ($i = 0; $i < strlen($str); $i++)
{
// This line cuts the string one character at a time
$str .= substr($str, $i , 1) . $line_end;
}
// Return the '$str' variable
return $str;
}
// Here is the string we want to affect
$text = "This is an example string!";
// Finally print out the string
print outputString($text, "
");
?>
©2004 - 2008 scriptplayground | Privacy Policy | Legal
Validate Site: XHTML CSS | Designed by: Matthew Keefe of mkeefeDESIGN