substr help
Posted: Fri May 05, 2006 7:15 am
hawleyjr | Please use
returns URN2 how can i get it to keep the zero's eg: URN000002
Thanks in advance,
Slash.
hawleyjr | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Hi quick question:
When doing the following substr then incrementing by one:Code: Select all
$GetMemberURN = "URN000001";
$URN = substr($GetMemberURN, 0, 3);
$Number = substr($GetMemberURN, 0, 6) +1;
$MemberURN = $URN . $Number;
echo $MemberURN;Thanks in advance,
Slash.
hawleyjr | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]