View Single Post
08-23-2011, 04:55 PM
#2
Village Genius is offline Village Genius
Village Genius's Avatar
Status: Geek
Join date: Apr 2006
Location: Denver, CO
Expertise: Software
Software: Chrome, Notepad++
 
Posts: 6,894
iTrader: 18 / 100%
 

Village Genius will become famous soon enough

  Old

Pretty simple, replied.

edit: it seems to have gotten deleted from the paste so here it is
PHP Code:
<?
$a 
'Raphael';
$b 'Castiel';

echo 
"start $a $b <br />";

$a .= $b;
$b=substr($a,0,(strlen($a)-strlen($b)));
$a=substr($a,strlen($b));
echo 
"end $a $b <br />";
?>
This solution will work with any two strings regardless of length.

I'm interested in continuing with this so if you'd continue to post them that would be great. I'd also be happy to contribute if you want.