php error

I have this:
<?php
$skey = mt_rand(0,100000);
....
>?
....
<img src="captcha.php?skey=<? print $skey; >" />

Something is wrong with the statement:

<img src="captcha.php?skey=<? print $skey; >" />

I run it through a syntax checker & it says

PHP Syntax Check: Parse error: syntax error, unexpected '>' in your code on line 403

I've looked at this till I'm going blind and I can see nothing wrong.

What is it?
Richard KortsAsked:
Who is Participating?
 
Marco GasiFreelancerCommented:
You have to close php tag correctly : ?> instead of >
0
 
Richard KortsAuthor Commented:
What a TOTAL idiot I AM.

That's obvious.

This is what happens when you are trying to solve a much bigger problem.
0
 
Marco GasiFreelancerCommented:
LOL: sometimes we just need a couple of fresh eyes!
0
 
Richard KortsAuthor Commented:
To Marco Gasi

Look for my next one. Coming right now. It's NOT so easy.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.