I would like to know how can i use variable here instead of constant. for ex
I have this statement
<link rel="stylesheet" type="text/css" href="<?php echo $this->getSkinUrl('css/abc.css')?>"/>
Now Instead of abc.css , I want tomake it variable instead of hardcode value
like $A = "abc.css" ;
So statement should look like ==>
$A = "abc.css" ;
<link rel="stylesheet" type="text/css" href="<?php echo $this->getSkinUrl('css/$A')?>"/>
Please guide me, I’m not able to do it.
Only code between
<?phpand?>marks is considered and processed as PHP code. And you placed$A = "abc.css" ;outside these marks. So the code in<link>tag is trying to work with undeclared variable.Also, only variables in double quoted strings are replaced.