Link to home
Start Free TrialLog in
Avatar of Computer Guy
Computer Guy

asked on

PHP concatination question

Hi, How can I add this line to the href link code below?

onMouseover="return hidestatus()"
<a class="dl" href="' . $dl['url'] . '/pdf/' . $num[$i] . '">

Open in new window

Avatar of dirknibleck
dirknibleck

Open in new window

<a class="dl" href="' . $dl['url'] . '/pdf/' . $num[$i] . ' onMouseover="return hidestatus()"' . '">

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Marco Gasi
Marco Gasi
Flag of Spain image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial

<a class="dl" href="<?=$dl['url']?>/pdf/<?=$num[$i]?>">

Open in new window

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.
echo '<a class="dl" ';
echo 'href="';
echo $dl['url'];
echo '/pdf/';
echo $num[$i];
echo '">';

Open in new window