Raised This Month: $ Target: $400
 0% 

help with Arg


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Xevious
Senior Member
Join Date: Sep 2009
Location: Computer Chair
Old 10-11-2009 , 00:08   help with Arg
Reply With Quote #1

PHP Code:
if (Arg1[0] == ''
if i want arg1[0] first character is nothing, then what i want to do?

Arg1[0] == 'nothing' ??
__________________
Nothing possible when you are not hardworking
Xevious is offline
Send a message via MSN to Xevious
shadow.hk
Senior Member
Join Date: Dec 2008
Location: WA, Australia
Old 10-11-2009 , 02:09   Re: help with Arg
Reply With Quote #2

if( !arg[0] )
shadow.hk is offline
Send a message via MSN to shadow.hk
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 10-11-2009 , 09:54   Re: help with Arg
Reply With Quote #3

Just a little FYI:
Every character in a string (ascii std) is represented by an integer value of 1-255. If the value in any location of the string is 0, that means null (empty or end of string).

Either of these is all you need to do:

if ( !arg[ 0 ] )

if ( arg[ 0 ] == 0 )
__________________
Bugsy is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 22:42.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode