sw45859 Posted February 24, 2004 Posted February 24, 2004 i am trying to do something like this: define($text['text'], $text['text_value']); where both values are coming from an sql query and the text value would look something like this: text ' . PREVIOUS_DEFINE . ' text the text above is in a sql table but the problem is when it is put into the define it is not "parsing" the php code. it is displaying it with the define name not the value of the define. any ideas or suggestions?
bloodshoteyes Posted February 24, 2004 Posted February 24, 2004 how about a few more lines of code...
sw45859 Posted February 24, 2004 Author Posted February 24, 2004 while($text = tep_db_fetch_array($text_query)){ define($text['text_key'], $text['text_content']); } an example of $text['text_content'] Enquiry from ' . STORE_NAME the output into the site is exactly like above, it's not putting the defined STORE_NAME into the string
241 Posted February 24, 2004 Posted February 24, 2004 what code do you have for the query edit you posted as I typed No longer giving free advice. Please place deposit in meter slot provided. Individual: [=] SME: [==] Corporation: [===] If deposit does not fit one of the slots provided then you are asking too much! Is your Osc dated try Phoenix raising oscommerce from the ashes.
sw45859 Posted February 24, 2004 Author Posted February 24, 2004 and i have tried putting both kinds of quotes around the text content, but it will not pick up the fact that STORE_NAME is defined i have a feeling i am going to have to create a custom function to get this to work how i am wanting.
241 Posted February 24, 2004 Posted February 24, 2004 you say that STORE_NAME is defined, is this within the file or being pulled from somewhere else No longer giving free advice. Please place deposit in meter slot provided. Individual: [=] SME: [==] Corporation: [===] If deposit does not fit one of the slots provided then you are asking too much! Is your Osc dated try Phoenix raising oscommerce from the ashes.
sw45859 Posted February 24, 2004 Author Posted February 24, 2004 it is defined from the osc configuration table which is called from the application_top.php, and i know its defined because i put an echo of just STORE_NAME next to it and it worked, it is something with the define value being pulled from the database with the STORE_NAME constant set in it.
sw45859 Posted February 25, 2004 Author Posted February 25, 2004 well i made a script to do it, just have to hardcode str_replace for any value that will be used.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.