"#1FFFC6" and "#4C59FF" are custom colors picked from some color picker in wordpress backend.
if i write the code below directly, it works just fine.
<h1 class="bg-[#1FFFC6] text-[#4C59FF]"> h1 title </h1>
but, this one not working.
$nav_bgcolor = "#1FFFC6";
$nav_textcolor = "#4C59FF";
echo "<h1 class='bg-[$nav_bgcolor] text-[$nav_textcolor]'>title</h1>";
is there any way i can do this by using tailwind and php echo? please help, thanks.
env : php7.4, tailwind v3, vscode.