Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 03 Nov 2017, 14:22
BulliM's Avatar
BulliM BulliM is offline
 
Join Date: Oct 2017
Set Mixed Variables In Template

I need help to understand how template variables works.

I need a variable from table phrase in database. Name of the variable key is a mix between plaintext and variable. Cannot explain exactly what I mean, so I show an example:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

The reason why I search for: I need the variable 'text' from db.phrase where varname = myphrasename within a part of myphrasename ($var['key']) is variable. Hope you understand my problem.

Solved. That works:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


Last edited by BulliM; 03 Nov 2017 at 14:31. Reason: Solved
Reply With Quote
  #2  
Old 03 Nov 2017, 22:36
noypiscripter's Avatar
noypiscripter noypiscripter is offline
 
Join Date: Aug 2013
I know it's solved and I was actually surprised your solution works. But I would do it this way using string concatenation:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

__________________
Glenn Vergara - Former vB Developer
Looking for vB mods? Even for vBCloud?
vB Mods That Rock!

Reply With Quote
  #3  
Old 04 Nov 2017, 09:08
BulliM's Avatar
BulliM BulliM is offline
 
Join Date: Oct 2017
Originally Posted by noypiscripter View Post
I know it's solved and I was actually surprised your solution works.
Me too!

Originally Posted by noypiscripter View Post
But I would do it this way using string concatenation:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.
I'll try. Thank you!

EDIT: Works! THX!

Last edited by BulliM; 04 Nov 2017 at 11:40.
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


New To Site? Need Help?

All times are GMT. The time now is 08:20.

Layout Options | Width: Wide Color: