Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Help with Parse error!

Featured Replies

Hello everyone,

 

I think I'm having a really dense moment, but I've been looking through this little snippet of code for about an hour and I can't figure out what I've missed thats stopping it working.

 

I keep getting the following error message:

 

"Parse error: syntax error, unexpected T_STRING in /home/pindesig/public_html/news.php on line 151"

 

The code is the following:

 

<?php require_once('blog/wp-config.php');

 

<?php if (have_posts()) : ?>

 

<?php while (have_posts()) : the_post(); ?>

 

<?php the_title(); ?>

<?php the_time(’F jS, Y’); ?>

<?php the_excerpt(); ?>

 

<?php endwhile;?>

 

Thank you for reading our latest news.

 

<?php else : ?>

<?php endif; ?>

 

 

Can anyone help me point out the obvious mistake!?!!?!?! :(

 

Regards

Lewis

hello the second line and second to last line you have : instead of ; i am new to php but thats all i can see hope it works for you

  • Author
hello the second line and second to last line you have : instead of ; i am new to php but thats all i can see hope it works for you

 

 

Tried it and had no luck... I'm open to all suggestions, I'm stumped so I'll just ask for help :p

Hello everyone,

 

I think I'm having a really dense moment, but I've been looking through this little snippet of code for about an hour and I can't figure out what I've missed thats stopping it working.

 

I keep getting the following error message:

 

"Parse error: syntax error, unexpected T_STRING in /home/pindesig/public_html/news.php on line 151"

 

The code is the following:

 

 

 

 

Can anyone help me point out the obvious mistake!?!!?!?! :(

 

Regards

Lewis

 

 

change this <?php if (have_posts()) : ?> to this <?php if (have_posts()) ; ?>

 

from : to ;

  • Author

The error was to do with the quotes in the dates tag just for everyones reference,

 

It shouldn't of been:

<?php the_time(’F jS, Y’); ?>

 

It should of been

<?php the_time('F jS, Y'); ?>

Got it working after a few hours!! :)

 

what was it out of interest...?

what was it out of interest...?

 

 

You any good at helping me out on a user reg page(s)? using mysql and php?

  • Author
You any good at helping me out on a user reg page(s)? using mysql and php?

 

Possibly, PM me what you need and I'll try to help you out.

 

I'm off to sleep now as its 01:24 in the morning, but I'll be on tomorrow.

 

Just got the wordpress section working, we will be launching a website very soon :)

 

Kind Regards

Lewis

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.