Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 729537
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T06:48:29+00:00 2026-05-14T06:48:29+00:00

My PHP experience is rather limited. I’ve just inherited some stuff that looks odd

  • 0

My PHP experience is rather limited. I’ve just inherited some stuff that looks odd to me, and I’d like to know if this is a standard way to do things. The page which shows up in the browser location (e.g. http://www.example.com/example_page) has something like:

<?
$title = "Page Title";
$meta = "Some metadata";
require("pageheader.inc");
?>
<!-- Content -->

Then pageheader.inc has stuff like:

<?
@$title = ($title) ? $title : "";
@$meta = ($meta) ? $meta : "";
?>
<html>
<head>
<title><?=$title?></title
</head>
<!-- and so forth -->

Maybe others find this style useful, but it confuses me. I suppose this could be a step toward a rudimentary content management system, but the way it works here I’d think it adds to the processing the server has to do without reducing the load on the web developer enough to make it worth the effort.

So, is this a normal way to create pages with PHP? Or should I pull all this in favor of a better approach?

Also, I know that “<?” (vs. “<?php” ) is undesirable; I’m just reproducing what is in the code.

  • 1 1 Answer
  • 1 View
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T06:48:29+00:00Added an answer on May 14, 2026 at 6:48 am

    Well, it’s certainly not an invalid way to do it – but it might be a little cumbersome to read and maintain. I wouldn’t say there’s a “normal” way to do anything like this in PHP. At the end of the day, you’re outputting variables into HTML – so there aren’t a variety of options without using a dedicated templating engine (and/or heading towards a more MVC-based approach, as mentioned by ryeguy).

    My suggestion: if it doesn’t suit your preferred style, change it. The most important thing, if you’re going to be developing and maintaining it, is that you can work with it comfortably, and efficiently.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Considering that my experience with PHP is limited, I used a contact form generator
A long shot but here's hoping someone has some experience coding PHP hooks for
i guess that many of us has acceptable years of experience in PHP programming,
Coming from PHP with some Java Struts 2.0 experience any tips/tricks on learning GWT?
I have plenty of experience with this in PHP, but am fairly new to
I'm trying to get started on combining my (slightly limited) PHP experience with my
(Disclaimer) MY php experience is approx 2 hours old and I have know idea
I don't have much PHP experience and I want to know how to best
I'm working on a PHP project and I would like to know recommendations for
I have substantial PHP experience, although I realize that PHP probably isn't the best

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.