Minase
Members-
Posts
339 -
Joined
-
Last visited
Everything posted by Minase
-
i run into this weird problem here is my code $input = file_get_contents("test.txt"); preg_match('/Battle Report (.*)Report details/s', $input, $overal); $overall = $overal[1]; preg_match('/Vitality\n(\S{1,25}) (.*) (.*)/', $overall, $attacker->Dmg); print_r($attacker->Dmg); and the test.txt Battle Report Name Hit points Vitality io 402 12.724 tu 29 0 Winner: io io captured: 46 Gold Report details if i put the above text into a string it works :| but if i read it from a file or via POST it wont any ideas? thank you
-
oh baka me thank you solved the problem
-
it does not matter the name,it was just informative,the problem is that even the simple querys are not working
-
hy there lets say that i have a code that is "problematic" here it is $q = "SELECT * FROM `users` WHERE `Username` = 'Minase' "; $test = mysql_query ($q); $test2 = mysql_num_rows($test); this is not the real code,i did split the code maybe it was something weird about it,but it isnt. the problem is that it return Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in LOCATION my real code function count ( $query ) { return mysql_num_rows ( mysql_query ( $query ) ); } any idea why it return that error? thank you
-
i think smarty is a little big and complex for my applications
-
hy there i was wondering what template system should i use.what i found over the internet was old,and outdated. i just need a template system to integrate in my projects. i need to split the HTML code from PHP one,its getting messy @ big files thank you
-
i did solve it i used tolerance option thank you very much for all your help
-
thank you guys the code works perfectly but on single lines only :| how i can make it to search for multiline too it seem that " . character doesnt include \n or \r\n" thanks again
-
yes i have multiple and i want to capture them into a string thank you
-
hy there i have the following text (game (name test) (valueb something) (etc) (etc) (etc)) (game (name test2) (valueb something) (etc) (etc) (etc)) // this is just a 3 line example ,it can be on 1 line or on 10 //thats how a doccument will look,i need to group everything from "(group till the two ))" anyone know how i can do this with regex? thank you
-
; this is an ignored line everything that is here is ignored (new line with \n or \r\n) this is a normal line i will execute everything from here thx
-
hy there i was wondering if a character was found for example " / " without quotes is found at the start of the line or in middle how i can skip everything till new line? thank you
-
yes i will add a template system its better. thank you
-
i dont want to use double quotes i already have lots of them and i dont want to escape characters too much
-
i want something different.i know that way but the code look a little messy :| thx for reply. saw at someone that he used eval or something similar
-
hy there ,i have the following code define ("test", "a value ..."); $text = 'Welcome to test ,enjoy your stay'; // the output should be $text = 'Welcome to a value... , enjoy your stay'; i tryed eval but doesnt work ... thank you
-
exactly what i needed thank you
-
so thats the only solution ? i was thinking on that but i wanted another solve. thanks for reply any other solve this have?
-
hy there i have some querys entering data into a table and one column is autogenerated by sql server.it is an integrer with auto increment. table overview -ID -Name -Data my query insert information in Name and Data the ID is autogenerated,but after i enter Name and Data i need to get the ID of what was inserted. any typs? thanks
-
thank you
-
look here http://www.weberdev.com/get_example-4726.html
-
hy there i was wondering how i can call a random function? i have something like $random = rand(0,1000); function BATTLE 1,2...1000 i want to make something like calling the specific function with help of $random. it is possible? thank you excluding if ,cause with if i should write damn a lot of code =/ which i dont want,even if i can use a loop i want something clear and nice thank you
-
nvm solved lol
-
hy there i was wondering how to do a string search i do have a function which retrive user permision from DB i was wondering how i can use if syntax to make some rules the permision are from a..g one user may have no permision,and the other one may have full i need something like if (Permision2($user->ID) == "%b%") { echo something } thanks Permision2($user->ID);
-
what you mean with that give an example at least.. //edit now i understood yes it is possible but it take a while and no i dont know how