Jump to content
#FlattenTheCurve ×

archive

Members
  • Content Count

    20
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by archive

  1. fopen has modes when opening files and you have opened the file in 'r' mode, which is for read only fopen("mydata.txt","r")
  2. You can't use echo for an array, try using print_r or var_dump if you do want to output the whole array.
  3. 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 (?, ?, ?, ?, ?);
  4. 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');
  5. https://www.microsoft.com/en-gb/outlook-com/
  6. 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?
  7. 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.
  8. Have you started learning the basics of HTML?
  9. You haven't assigned $data with the phone number that you want to format.
  10. 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.
  11. 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.
  12. 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?
  13. If that's the case, then you probably shouldn't be dabbling with it: apart from the fact that that isn't where your problem lies. As you can see from the code, it's [unnecessarily] difficult to read and if you don't understand what's going on - leave well alone, . You have several classes interfering with the layout and tracking them down is where you need to focus your attention as this will be how you can centre your logo.
  14. If you want to split a file using explode or str_replace, then you need to examine it first to see how the contents are laid out so that you can work out how to split it up. Why do you want to change a few lines rather than just re-generate the file?
  15. str_replace will replace everything found in the supplied string, which in your case is the whole rss file. Split it into parts so that you can change those parts that you want to, simplexml will help you to do that.
  16. You can create a simple xml object and then go through that? But as said, you have not explained what you want to do or why you would want to do it.
  17. Guess your code might have been a better title. A more detailed description of the problem might get you a better answer. You're missing a closing brace in your code for a start. Why would you want to show yourself coding when it doesn't work?
  18. Use $_SERVER['DOCUMENT_ROOT'] ... defs.php and then add whatever path you are using to get to the defs.php file. Only have one version of the file, otherwise it will be a nightmare to keep up to date and pointless having it in the first place.
  19. archive

    Hi

    Simple hello, not much to say as yet - hope to help and be helped
×
×
  • 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.