Uutiset:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu
Advertisement:

Starting to code a CMS for my site

Aloittaja Blade14228, syyskuu 29, 2007, 08:33:25 AP

« edellinen - seuraava »

Blade14228

I'm starting to code a CMS, and I am new to PHP. I am just trying this for fun, and I don't have any plans of putting it up live (unless it turns out really great). However, I am already stuck! I am coding the settings.php file right now, and am trying to put some basic text values in it. So far I have,


 
$text = array(
  t1 = "Welcome to ".$siteName."!",
  t2 = "Sorry, but you must be registered to login!",
  t3 = "Welcome back, ".$userName."!",
  t4 = "See you soon!",
  t5 = "Your last login was",
  t6 = "News",
  );

So, I built index.php with this code.

<?php
require_once('settings.php');
$siteName 'Test app';
echo 
$text[t1];
?>


However, I get the following error.

Parse error: syntax error, unexpected '=', expecting ')' in ###### on line 27


What is wrong with the array code?

Thanks for any and all help,
Keith

Duggis

remove your comma after the last element.

Blade14228


Advertisement: