Jump to content
Stef's Coding Community

flatronn

New Members
  • Content Count

    3
  • Joined

  • Last visited

Community Reputation

0 Neutral

About flatronn

  • Rank
    New member
  1. Then why dont you bugger off and stop wasting my time
  2. Hi , I have got here so far as below <?php $people = array("Peter", "Joe", "Glenn", "Cleveland"); reset($people); while (list($key, $val) = each($people)) { echo "$key => $val<br />"; } ?> My problem how to get a comma between each person and then a and at the last name So the string would look like: (peter,Joe,Glenn and Cleveland.) CODING FOR THAT SEEMS VERY DIFFICULT. Cheers
  3. Hi, I have been given a excercise to do but am strugling with it the question is below if some one could enlighten me on how it could be done. Write a function to return a list of people This function should accept an array of people's names as an argument and return a string list of these names. If there is a single person, the name should be returned as is. If there are two people, the two names should be separated by the word ‘and’. If there are more than two people, the last two names should be separated with the word ‘and’, and all previous names separated with a comm
×
×
  • Create New...