Jump to content

[SOLVED] PHP question


Mathematicman

Recommended Posts

Hey everybody

 

I'm kinda new to php... so if this question has been asked before, I'm sorry...

 

I was trying to put together a PHP program (is that what you call it?).

And I needed it to refresh every 60 seconds or so...

So I looked in the "PHP Manual" on php.net... and I found the function "ncurses_refresh"

 

Below is the URL to the page where I found it

 

http://ca.php.net/manual/en/function.ncurses-refresh.php

 

So I tried it... The code looked something like this:

 

<?php

$ch= "5";

ncurses_refresh( int $ch );

?>

 

And it came up with this error:

 

Parse error: syntax error, unexpected T_VARIABLE in /home/joshua77/public_html/PHP_sandbox/test1.php on line 3

 

So my question is... What do I need to do to fix it?

 

Thanks in advance for your help.

 

Link to comment
https://forums.phpfreaks.com/topic/67265-solved-php-question/
Share on other sites

Well, to address the actual ERROR:

the int in the manual is telling you what type of variable to send. You don't type int in your code. You just send the variable.

ncurses_refresh($ch);

 

However, use one of the other methods provided here to do what you want.

Link to comment
https://forums.phpfreaks.com/topic/67265-solved-php-question/#findComment-337563
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.