Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.