Jump to content

Minase

Members
  • Posts

    339
  • Joined

  • Last visited

Everything posted by Minase

  1. 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
  2. oh baka me thank you solved the problem
  3. it does not matter the name,it was just informative,the problem is that even the simple querys are not working
  4. 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
  5. i think smarty is a little big and complex for my applications
  6. 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
  7. i did solve it i used tolerance option thank you very much for all your help
  8. 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
  9. yes i have multiple and i want to capture them into a string thank you
  10. 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
  11. ; 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
  12. 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
  13. yes i will add a template system its better. thank you
  14. i dont want to use double quotes i already have lots of them and i dont want to escape characters too much
  15. 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
  16. 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
  17. exactly what i needed thank you
  18. so thats the only solution ? i was thinking on that but i wanted another solve. thanks for reply any other solve this have?
  19. 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
  20. look here http://www.weberdev.com/get_example-4726.html
  21. 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
  22. 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);
  23. 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
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.