FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Find Strings (Tokens) in File and push them into an array - How?
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Find Strings (Tokens) in File and push them into an array - How? [message #169541 is a reply to message #169538] Fri, 17 September 2010 12:31 Go to previous messageGo to previous message
matt[1] is currently offline  matt[1]
Messages: 40
Registered: September 2010
Karma:
Member
On Sep 17, 8:17 am, DigitalDude <e.blumsten...@googlemail.com> wrote:
> Just for the record: the parsing is not the problem, just how to get
> the token from the file into my array. I need to copy each token that
> matches a pattern (e.g. "$__txt" or so) and then save it as a string
> into an array (which I would probably do with array_psuh or so).

Sounds like you need regex:

preg_match_all("/(\$__txt[^;]*);/", $fileTextString, $matches);
print_r($matches);

Not a complicated job to take structure of $matches and manipulate it
to your needs.

ref: http://us2.php.net/manual/en/book.pcre.php
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Advanced SQL injection complete tool pack(tutorials,scanners,admin finder,shells,md5)
Next Topic: Stats comp.lang.php (last 7 days)
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Sep 20 19:25:34 GMT 2024

Total time taken to generate the page: 0.06570 seconds