Jump to content


  • Posts

  • Joined

  • Last visited

  • Days Won


archive last won the day on February 5 2018

archive had the most liked content!

archive's Achievements


Member (2/5)




Community Answers

  1. Yeah, I wasn't trying to be clever, I wasn't sure if I'd missed something. I had intended to edit the post after clarification but I can't now, sorry.
  2. A few seconds is probably a long time? $j is not used in your script and has no effect on any of the code following it which is why it hasn't been changed and why you haven't noticed, is this causing other problems though? As Barand points out, really you should look change the query which would allow you to arrange the results in descending order as well as joining all the queries together in one. Barand: for($j='2018';$j<=$maxdate;$j++) { Should that have been: for($j='2018';$j<=$maxdate;$j--) {
  3. fopen has modes when opening files and you have opened the file in 'r' mode, which is for read only fopen("mydata.txt","r")
  4. You can't use echo for an array, try using print_r or var_dump if you do want to output the whole array.
  5. You should be getting errors, check your query as it has problems with single and double quotation marks; better still would be to change it to prepared statements. INSERT INTO users (firstname, lastname, email, username, password) VALUES (?, ?, ?, ?, ?);
  6. Use a root based path as you might not know where you are redirecting from: header('Location: /soapbox/index.php');// same as typing http://localhost/soapbox/index.php #header('Location: /new_page.php'); #header('Location: /index.php'); #header('Location: /soapbox/index.php'); #header('Location: /soapbox/channel/index.php');
  7. https://www.microsoft.com/en-gb/outlook-com/
  8. Is this homework? Did it work when you tried it that way? Where's the rest of your code? What does "share" mean (given the description above)? Will there only ever be the three different types of discounting?
  9. It looks like you have doubled up on the closing brackets in your input tag: <input type="text" name="mytext"/> <input type="text" name="moretext"/> /> The browser will take anything outside of the tag as text to display. In html 5, there's no need to use the slash at the end of self closing tags, a simple: <input type="text" name="mytext"> without the slash is o.k., unless you have a specific need for older html.
  10. Have you started learning the basics of HTML?
  11. You haven't assigned $data with the phone number that you want to format.
  12. Have you checked to see if $property_detail_items_order is an array? And use code tags along with formatting when posting code, it makes it easier to read and you'll be more likely to get a quicker response.
  13. I'm not really sure what you are trying to achieve since you haven't explained what you want in any great detail such as how big the array will actually be and if the elements will be purely numeric. I can however point you to a few things which may improve performance. Why create a variable which is hardly used? $stored_index = count($array); for($current_index = 0; $current_index < count($array); $current_index++) Do you really need to test type as well as value? and have a look at your second test and decide if you really need it? if ($current_value === $comparing_value && $comparing_index < $stored_index) And have a look at break This is by no means an exhaustive analysis, but should shave some time off execution.
  14. Joey, It's not a case of being smug, evasive, clever, belittling or any of the other things you might think is going on, the facts are that you have not read the rules for posting, don't seem to have made much effort in resolving the problem for yourself and offered a few lines of code which is about as much use as showing a picture of a kipper. You've stated that you want to learn how to do it, which is great and commendable, what have you done to achieve this?
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.