Jump to content

Destramic

Members
  • Posts

    967
  • Joined

  • Last visited

Everything posted by Destramic

  1. Thank you...also can I ask one more thing...i'm working on a mysql class for my frame work and wondered if I would be a good idea to automatical get the data from a table and add to an array and sort and select it from there instead of doing it all from the mysql query?...i hope you understand
  2. Hey guys I have an array and want to make it into a sting and separate each array segment by a comma...is there a function for this or should I just do it in a loop myself?...thanks
  3. ive tried: Allowoverride All inside my .htaccess file but it wont run...anyone help please?
  4. hey guys i have apache installed but im sure my .htaccess file isnt being read...is there something in the config file i have to do please?...thank you
  5. hey johnny i found a good article i think http://anantgarg.com/2009/03/13/write-your-own-php-mvc-framework-part-1/comment-page-2/#comment-8619 is this a good example of mvc?
  6. thank you i'll have a read and let you know how i get on...maybe i will scrap the template engine
  7. thank you...do you have a good article about mvc please?
  8. but wont template files load quicker? and whats the point in smarty then?
  9. well ive come to the conclusion that i think a template engine would be good for my website for i can edit the .tpl file when things need to be changed without the php side of things being toutched by others
  10. hey guys im making a template class which is working and im trying to impliment a loop section for MySQL results... but i need to be able to find a match for a string such as: {section name=1 loop=$2} content {/section} but also extract the values of name, loop and the section content if anyone could advise me on the best way this can be done please...thank you
  11. hey guys im trying to find a string inside a string which could be made up of different things eg... {$test}, {$test1}, {$test2} etc (but the varable inside could be called anything hence maybe using regex im not sure?) is this possible?...i hope you guys understand....thanks
  12. thank you that worked great...also one last thing....is it possible to use call_user_func on a class functuion?...thanks again
  13. hey guys just a simple one...im trying to replace {$name} but i dont think ive got the right prefix in the str_replace function...if anyone could tell me where i am going wrong please $content = str_replace("{/$".$variable."}", $value, $content); {$name}
  14. there is no php in my template just template varables but i need to know how to include the template file into my php file?
  15. ok i see...is there a site tutorial that i can use to make that system please?
  16. anyone know how this is possible please?
  17. no way to include that format on your website other than smarty?
  18. my firefox won't open up .tpl format im running apache...how can i view that format on my apache please?
  19. yeah ok that makes sence but how do i get the content and replace the strings please?
  20. PFMaBiSmAd im trying to replace hello with test can you explain what is wrong please?
  21. i understand that but i just want to be able to replace that before i improve the script....but i think it would make sense to replace after you've displayed the file? if someone could help me to replace the sting?
  22. im trying to simply replace hello with test but its not working...just outputting hello
  23. im trying to make a simple template engine but am having a problem replacing the string in the content....if anyone could give me any help or pointers please <?php class Template { public function display($filename) { echo "hello"; } public function assign($variable, $value) { if (!is_array($value)) { ob_start(); $contents = ob_get_contents(); $contents = str_replace($variable, $value, $contents); ob_end_clean(); return $contents; } } } $template = new Template(); $template->display(); $template->assign("hello", "test"); ?> code above will only display hello and not test as it should
  24. hey guys i have an if statement and if it returns false then i want it to change to variable values....something like this but it doesn't work IF(@points = '0', @rank + 1, @rank @drawing = '1') can anyone tell me how this is possible please
×
×
  • 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.