Today's Posts Follow Us On Twitter! TFL Members on Twitter  
Forum search: Advanced Search  
Navigation
Marketplace
  Members Login:
Lost password?
  Forum Statistics:
Forum Members: 24,254
Total Threads: 80,792
Total Posts: 566,472
There are 1989 users currently browsing (tf).
 
  Our Partners:
 
  TalkFreelance     Design and Development     Programming     PHP and MySQL :

PHP Programming Challenge of the Day #1

Thread title: PHP Programming Challenge of the Day #1
     
    Thread tools Search this thread Display Modes  
Prev Previous Post   Next Post Next
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.

     


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

  Posting Rules  
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump:
 
  Contains New Posts Forum Contains New Posts   Contains No New Posts Forum Contains No New Posts   A Closed Forum Forum is Closed