I have a date which is saved in a regular string. // format = DD-MM-YYYY $date = “10-12-2011”; How can I get the date-string +1 day so: 11-12-2011?
Tag: php
Systematic way to store pictures for social website [closed]
I’m building a basic social website where users can upload pictures. I’m going to store store the images on the file system. When a user uploads a picture, how do you think I should name the files? I …
Creating an array of objects in PHP
I would like to know what is the right of creating objects arrays in php. My goal here is to be able to get data like this: Thanks for your time. EDIT: And if I want to do it in class it should look like this? Answer Any of the following are valid:
HTML table to php array
————–EDIT———————— So i am going with the DOM approach. Here is what I have so far: <?php function getdata(){ $contents = file_get_contents('internatdata.htm'); …
Registration script, need a database input to be checked then deleted upon register
I have a problem with my script. What it is supposed to do is that when a user register with the form, it should insert it, but only if the “passkey” matches the one that is in a different table that I set. After it has been verified it should insert the user info to the database, and then delete
How to retrieve an entity with all of its associations using EntityManager in Doctrine2?
I have a simple entity with many-to-many and one-to-many associations. I’m aware of ‘Joins’ for fetching related associations which is a manual solution for my problem. How can I fetch an entity with all of its associations using EntityManager in Doctrine2? e.g.: Answer Doctrine 2 uses Proxy…
PHP GD Library output an image and text content on same page
I am trying to output an image to a browser and then output HTML (not directly related to the image) on the same page. Is this possible? I am having a heck of a time figuring it out. Here is my code I …
Checking if value exists in array with array_search()
If 0 could be a possible key returned from array_search(), what would be the best method for testing if an element exists in an array using this function (or any php function; if there’s a better one, please share)? I was trying to do this: But that would of course return false if $needle is the first e…
How to make a PHP based script for finding UK addresses by entering postcode?
I’ve almost looked everywhere but nothing found, so my only hope would be here though! 🙁 I want to make a PHP based script for finding UK address by entering postcode, so a list would show with a …
How to connect to a mysql database in C# and mimic the SELECT, UPDATE and INSERT functions
How can I connect to a MySQL database in C#, and use it to UPDATE values in the database, INSERT values in the database and SELECT values from the database. Also, is it possible to get the value of …