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

  • SEARCH
  • Home
  • 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 5837831
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T11:24:12+00:00 2026-05-22T11:24:12+00:00

After several months of trying to get my head around PHP frameworks, moving from

  • 0

After several months of trying to get my head around PHP frameworks, moving from one to another with basic php knowledge I decided to call it a day with frameworks and go back to the php books and learn from scratch so in future in the near future I can start building my website mvc style without having to learn some other framework that would be abandoned when a newer version came out.

Anyway I purchased Learn PHP, MySQL and Javascript book by Oriely Media and have been practising and find it very interesting.

HOWEVER…

I am trying to get my head around this:

<?php

echo name_fixer("WILLIAM", "henry", "gAtEs");

function name_fixer($name1, $name2, $name3) {
    $name1 = ucfirst(strtolower($name1));
    $name2 = ucfirst(strtolower($name2));
    $name3 = ucfirst(strtolower($name3));

    return $name1 . " " . $name2 . " " . $name3;
} 

I have an idea what is going on but my question is when the function is called/echoed are the names I’m passing as arguments being passed into the function?

I would like to know exactly what is going on. For some reason this is the only part of the book so far where the writer hasn’t gone into detail about exactly what is happening.

A thorough explanation would be appreciated greatly and allow me to move on to the next part of the book.

  • 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-05-22T11:24:13+00:00Added an answer on May 22, 2026 at 11:24 am

    Yes, the names you are passing as arguments get passed into the function.

    myFunction ('a','b'); // call myFunction, passing 2 values
    
    // function receives 2 values
    function myFunction($argument1, $argument2) { // <-- function declaration
      echo $argument1 . "<br/>";
      echo $argument2 . "<br/>";
    }
    

    The idea is that you pass values to the function and then those values are put into the variables you specify in the function’s declaration of arguments.

    You can call your argument variables anything you want, so they don’t have to be $argument1 or whatever. They are assigned values in the same order as what was passed, so ‘a’ gets assigned to $argument1, and ‘b’ gets assigned to $argument2.

    There’s a lot more to it than that, like passing more than just a single value (you can also pass things like arrays and objects), and you can also pass by reference, etc.. but you should get to that in your books. The overall point here though is that you pass a value to the function and the variables specified in the argument area receives those values, so that the function can do stuff with them.

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

Sidebar

Related Questions

after several months having the site disappear from search results in every major search
I'm working with someone who's looking to get back into programming after several years
I've started to use XCode several months ago, after using IntelliJ for several years,
All, After several months of not touching our databases I fired up Rapid SQL
After several months of coding in Objective-C, I completely understand when I need an
I'm starting to code in openGL ES 2 after several months of doing it
One of my coworkers is working on a SQL query. After several joins (workers
I'm trying to create a Expr<'a -> string by hand, and after several hours
After using .NET for several years, I've spent the last few months in the
Sorry I'm a bit new to this so just trying to get my head

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.