Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


[PHP] Selecting the first 4 characters?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Localhost
I post too much
Reputation: 0

Joined: 28 Apr 2007
Posts: 3402

PostPosted: Tue Aug 26, 2008 1:31 pm    Post subject: [PHP] Selecting the first 4 characters? Reply with quote

How can i select the first 4 letters in a string?
_________________
Back to top
View user's profile Send private message MSN Messenger
kitterz
Grandmaster Cheater Supreme
Reputation: 0

Joined: 24 Dec 2007
Posts: 1268

PostPosted: Tue Aug 26, 2008 1:38 pm    Post subject: Reply with quote

From the string class, use

substr();

Editt: oops i did not notice u said php sorry
Back to top
View user's profile Send private message Send e-mail
Typhoon808
Expert Cheater
Reputation: 0

Joined: 27 Mar 2008
Posts: 175
Location: Wales

PostPosted: Tue Aug 26, 2008 2:00 pm    Post subject: Reply with quote

kitterz wrote:
From the string class, use

substr();

Editt: oops i did not notice u said php sorry


You can use that in PHP, too.

http://www.w3schools.com/PHP/func_string_substr.asp
Back to top
View user's profile Send private message
kitterz
Grandmaster Cheater Supreme
Reputation: 0

Joined: 24 Dec 2007
Posts: 1268

PostPosted: Tue Aug 26, 2008 2:56 pm    Post subject: Reply with quote

Typhoon808 wrote:
kitterz wrote:
From the string class, use

substr();

Editt: oops i did not notice u said php sorry


You can use that in PHP, too.

http://www.w3schools.com/PHP/func_string_substr.asp


REally? I did not know. I know 0 php, so I guessed that it is not part of php
Back to top
View user's profile Send private message Send e-mail
Localhost
I post too much
Reputation: 0

Joined: 28 Apr 2007
Posts: 3402

PostPosted: Tue Aug 26, 2008 7:56 pm    Post subject: Reply with quote

so substr($hash, 4); would select the first four letters from a hash. Thank you very much Smile
_________________
Back to top
View user's profile Send private message MSN Messenger
nog_lorp
Grandmaster Cheater
Reputation: 0

Joined: 26 Feb 2006
Posts: 743

PostPosted: Wed Aug 27, 2008 1:55 am    Post subject: Reply with quote

PHP is heavily based on C, in its syntax and its libraries. Check out PHP.net documentation, it is fucking wonderful. Also, php.net/quickref is sweet.

~nog_lorp

_________________
Mutilated lips give a kiss on the wrist of the worm-like tips of tentacles expanding in my mind
I'm fine accepting only fresh brine you can get another drop of this yeah you wish
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites