PHP code error help pls :((

Started on the old forum in January 2013 · view the original in the archive · old links redirect here

2 replies · 2,401 views · started 13 years ago · 1 min read

3 participants
RDXZ Newbie · 5 posts #1
<?php
for($c=0;$c=<50;$c++){
$link='http://site.com/dloadphp?id='.$c;
$name='files/'.rand(33,55563).'.3gp';
copy($link,$name); }
?>

Pls masters help me out to fix this its showing error when i execute it :((

Parse error: syntax error, unexpected '<' in /wwwhtml/badgame/index.php on line 2

wap2k Developer · 168 posts #2
<?php 
for($c=0;$c<=50;$c++){ 
$link='http://site.com/dloadphp?id='.$c; 
$name='files/'.rand(33,55563).'.3gp'; 
copy($link,$name); 
} 
?>
softwarefreak Senior · 349 posts #3

The syntax error is here

$c=<50;

Change it to

$c<=50;

So after correcting, the code becomes

<?php 
for($c=0;$c<=50;$c++){ 
$link='http://site.com/dloadphp?id='.$c; 
$name='files/'.rand(33,55563).'.3gp'; 
copy($link,$name); } 
?>

I need some facebook likes, can you please help me 🤝 http://facebook.com/softwarefreakin I noticed social media is really powerful 🧙 Well DONE is better than well SAID

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close