Jump to content

levyta

Members
  • Posts

    11
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

levyta's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Thanks for the answer. What if I want to reverse only the letters? e.g., $string = "abc 12,345 def" I want to have: $string = "cba 12,345 fed"
  2. I have a sting, containing numbers and letters, such that: abc 12,345 def I want reversing only the words, so the result will look: def 12,345 abc. I know how to reverse the all string: $array = explode(" ", $string); foreach ($array as &$word) { $word = strrev($word); } $rev_string = implode(" ", $array); but don't know how to deal with the numbers. Thanks
  3. how can I get iframe content as a variable to be used by PHP? I had found several suggestion in google how to get the content, but couldn't figure out how to use it as a variable. E.g., http://roneiv.wordpress.com/2008/01/18/get-the-content-of-an-iframe-in-javascript-crossbrowser-solution-for-both-ie-and-firefox/
  4. Is there any way to launch "windows Fax and Scan" using php?
  5. It doesn't work. I've tried your suggestion and received "1970-01-01".
  6. I'm looking for a way to find the date between to date. any suggestions? For example: Date1 = "2012-01-01"; Date2 = "2013-01-01"; I want to get "2012-07-01"; Thanks
  7. I have the following query: INSERT ignore INTO `table3` (`id`) SELECT table1.id FROM table1 JOIN table2 ON table1.id = table2.id WHERE … ORDER BY table1.date DESC LIMIT 400 Does anyone know a way how to fasten the query?
  8. I'm new to php and mysql. My sql server version: 5.1.41 I have table (named: upload) including two columns: Filename: varchar(200) Content: mediumtext I'm trying to upload the content of html files in a directory to the table, using the following php script: <?php $connection = mysql_connect("localhost","root","mysql") or die("ERROR: Could not connect to database!"); $db = mysql_select_db("try1",$connection) or die ("Couldn't select database"); $directory = "./"; $directory = (!strstr($directory,"*") || $directory =="./" ) ? $directory."*" : $directory; $files = glob($directory= "*.htm"); for($i=0;$i++){ $href = basename($files[$i]); $content = file_get_contents ($files[$i]); mysql_query("INSERT INTO `try1`.`upload` (`name`, `content`) VALUES ('$href','$content')"); } mysql_close($connection); ?> None of the files is uploaded. I can't find why. Any help is appreciated.
×
×
  • 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.