Computer Guy
asked on
PHP concatination question
Hi, How can I add this line to the href link code below?
onMouseover="return hidestatus()"
onMouseover="return hidestatus()"
<a class="dl" href="' . $dl['url'] . '/pdf/' . $num[$i] . '">
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
<a class="dl" href="<?=$dl['url']?>/pdf/<?=$num[$i]?>">
Is your code part of an echo statement?
I have an error in my suggestion. MarqusG's is correct.
As written this line seems to be an incorrect mixture of HTML and PHP.
<a class="dl" href="' . $dl['url'] . '/pdf/' . $num[$i] . '">
Maybe if it is in PHP, you would start with something like the code snippet, then insert the Javascript prompt code into the collection of echo statements. I find putting one thing on each line makes for easier coding, debugging and modification.
<a class="dl" href="' . $dl['url'] . '/pdf/' . $num[$i] . '">
Maybe if it is in PHP, you would start with something like the code snippet, then insert the Javascript prompt code into the collection of echo statements. I find putting one thing on each line makes for easier coding, debugging and modification.
echo '<a class="dl" ';
echo 'href="';
echo $dl['url'];
echo '/pdf/';
echo $num[$i];
echo '">';
Open in new window
Open in new window