Reply to Re: [PHP] removing chars from string

Your name:

Reply:


Posted by Josh Olson on 06/27/05 18:56

> I know that it is length, and I gave the correct length for an 11 character string minus two characters. But as always, there is more than
> one way to skin a mule.


$string = '12345678901';

$jayString = substr($string, 0, 9);
$kevinString = substr($string, 0, 8);

echo $jayString; // echos 123456789
echo '<br />'; // echos 12345678
echo $kevinString;

It turns out to "skin" a mule is to outsmart him. Because mules aren't
actually stubborn, they're just smarter than most of us.

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация