Avatar of lawrence_dev
 asked on

How do use ' ' within this code?

I am getting an error on this line.  How do I fix?  I have tried several variations.

$db2     = "productf_' . $supplier['db'] . '";

Open in new window


Avatar of undefined
Last Comment
Ray Paseur

8/22/2022 - Mon
Ryan Chong

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question

Julian Hansen

You can also do this
$db2 = "productf_{$supplier['db']}";

Open in new window

Your question is confusing - you have mixed " and '
It looks like your opening question is asking to produce this output


I am guessing this is not the case
Ray Paseur

For anyone coming to this question in the future, E-E has an article explaining how PHP handles quotes and apostrophes.
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck