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 7997145
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T14:54:03+00:00 2026-06-04T14:54:03+00:00

Hello there I am new to php and want to learn to write reusable

  • 0

Hello there I am new to php and want to learn to write reusable php code, a framework to build CMS for the sites that I am going to create.

From where should I learn such approach. If Possible please share some of the links of tutorials pdfs anything that can help me.

  • 1 1 Answer
  • 0 Views
  • 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-06-04T14:54:05+00:00Added an answer on June 4, 2026 at 2:54 pm

    Like Michael said, don’t re-invent the wheel.

    You can choose from many frameworks when it comes to PHP. You might also consider using Ruby on Rails. In my experience, all ‘good’ PHP frameworks are just Ruby on Rails wannabes and bad at that too. But saying that is just begging for a flame war, so lets all pretend I didn’t just say that.

    —- on topic —-

    You say that you are a beginning PHP-er and want to learn to 1. build reusable code and 2. build a CMS using 1.

    An important practice of writing reusable code to me is that you split up functionality of a library you make up in as many parts as you can. To take a recent example of a digital store I am building, I would have a function that clears my shopping cart, one that clears the register one that resets the fields, etc. By splitting the code up in these different functions I was able to call some of them when a transaction was complete (with the addition of saving the transaction) and I when a search was completed (just reset the fields). Think of it like a chest of tools where you can either have screwdrivers attached to all the other tools, or you could just have 1 screwdriver. And this is just one aspect of it.

    @Galwegian posted a good answer about more elements to reusable code on SO: How do you make code reusable? as well.

    1. Learning how to build a CMS is a pretty broad question. If you were doing it just for the fun of it or just so to learn how to write better PHP; look around at what other CMSes are doing and wonder how they solved certain things, what makes them work or not and try to figure out how you can build that too.

    If you want to build websites professionally; please don’t create your own CMS. You will hate yourself for it later. Go for something with a wide user base and many tutorials, like drupal or wordpress. When building your own CMS you’ll just be stuck wasting time finding solutions to problems that were already solved a lot better by others.

    — half topic—
    I saw this PHP course coming by, it isn’t free though, but it should get you started. Nettuts is a good resource for tutorials and alike either way, check it out.

    http://net.tutsplus.com/tutorials/php/php-fundamentals-new-premium-course/

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

Sidebar

Related Questions

Possible Duplicate: New Cool Features of C# 4.0 Hello, There are several(many) questions at
I want to include Core Location and I'm trying to follow this tutorial: http://www.mobileorchard.com/hello-there-a-corelocation-tutorial/
Hello is there a class that does a pretty conversion?
I want to store php code inside my database and then use it into
var marker = new google.maps.Marker({ position: myLatlng, map: map, title:Hello World! }); <?php $fd
The simplest script: <?php echo 'hello'; Takes about 3 seconds to execute. There seems
Is there any well known established framework for C or Java or PHP to
I'm building a unit testing framework for PHP and I was curious if there
Hello this is my code String url = http://en.wikipedia.org/w/index.php?title=Special%%3ASearch&search=+q.getAuthor().replace( ,%20)+; Uri uri = Uri.parse(url);
Let's say I have these two arrays: string[] arr1 = new string[2]{Hello, Stack} string[]

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.