Welcome Guest, Not a member yet? Register   Sign In
Parser non-set variables question/improvement
#1

[eluser]Deyan Yankov[/eluser]
Hello. I am working generally with the parser class instead view. The problem is when some variable is not set.

For example in the view file you place

{variable}

And if you do not set $data['variable'] = '', when viewing the file, the {variable} text appears. Is there a way to do so the non-set variables will be by default empty strings and do not show to the user? I tried something with preg_replace, but the problem is that the {} delimiters are used also for the $.post and it replaces anything between {} also in the javascript.

Regards,
Deyan


Messages In This Thread
Parser non-set variables question/improvement - by El Forum - 10-11-2010, 04:27 AM
Parser non-set variables question/improvement - by El Forum - 10-11-2010, 04:28 AM
Parser non-set variables question/improvement - by El Forum - 10-11-2010, 04:32 AM
Parser non-set variables question/improvement - by El Forum - 10-11-2010, 05:19 AM
Parser non-set variables question/improvement - by El Forum - 10-12-2010, 12:57 AM
Parser non-set variables question/improvement - by El Forum - 10-12-2010, 04:02 AM



Theme © iAndrew 2016 - Forum software by © MyBB