im having a problem getting this code to work...i know it may not make sence why i would do this but it is for a larger script...is there any reason why it wont echo please?
define ('TEST_VAR', 'hello');
$var = "TEST";
echo {$var}_VAR;
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
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
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
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?
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
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
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
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}
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?
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.