php

What regex pattern do I need for this?

I need a regex (to work in PHP) to replace American English words in HTML with British English words. So color would be replaced by colour, meters by metres and so on [I know that meters is also a British English word, but for the copy we'll be using it will always be referring to units of distance rather than measuring devices]. The pat...

Magento Installation

Hai Is it possible to install magento in a local server and access it in to another system in the same network. Thanks in advance .... ...

Dropdown not getting populated in IE?

I am trying to get the values to a select list for subcategories on the basis on what is chosen in categories select list. It doesn't seem to work on IE. Can anyone suggest the problem? In the php file I have <body onload="setSubcategories(default_value);"> In the js file I have something like subcategories = new Array(); subcateg...

Formatting phone number

For a decent and standardized php function I want to format a user inputted string to a std. international phone number format. The string will be stripped from other characters as digits and +-signs. All spaces will be deleted. After that I want to format the different strings to a standardized form: +310612345678 -> +31 (0)61 234 56...

How to create a nested menu from MySQL with PHP?

I need to create a menu with PHP from a MySQL database. Table called categories has id, name, parent_id, shortdesc, etc. The output need to have parent list and children list under the partent list as follows. If you can show me codes or website, I will appreciate it. <ul id="catmenu"> <li class="menulist">Cars <ul> ...

How to implement the "Member for " interval like SO in PHP?

Possible Duplicate: How do I calculate relative time? It shows 2 days,2 month,1 year and so on. How to do it? ...

Splitting a string in certain way.

I have the following string {item1}home::::Home{/item1}{item2}contact_us::::Contact Us{/item2}{item3}..... and so it goes on. I need to split the string the following way 1=>{item1}home::::Home{/item1} 2=>{item2}contact_us::::Contact Us{/item2} Is there a way? ...

OpenId library (include files are not found by script)

Hi all, I have been trying to implement openid functionality into my website. I downloaded the JanRain's library. I extracted the 'Auth' folder in my classes directory and following the example in the 'example' folder I created the try_auth.php, finish_auth.php, common.php file in the include directory. Now when I click on the openid ...

Magento inheriting category settings

Hi all, Is it somehow possible when i add a category in my magento store, it inherits the settings of the parent category? // Roland ...

How can I install and launch tesseract-ocr using PHP

I am looking for a OCR component that converts images of text into characters using php. I got a script tesseract-ocr from google code. How can I install and launch tesseract-ocr through php ? As I am a beginner in PHP, I cant come up with the documentation they provided. I need some simple steps to install and launch ? thanks in ad...

Two Submit buttons in one form

I have a form which has got five (5) file input controls along with other controls. This form also has got two (2) submit buttons. I have used JQuery Validation plugin to validate form inputs. Name of one submit button is "Upload_Images" and name of another is "Upload_Project". What I want to do is that if user clicks on "Upload_Image...

How do I dynamically create a zip file using PHP on Linux?

I need my PHP script (running on a Linux server) to dynamically create a downloadable zip. Presently my script is working locally on my Windows server, but not on Linux. If anyone can help me out with sample script, your help would be much appreciated. ...

How to save data in unpublic google spreadsheet using PHP without Zend Gdata library?

How can I save data in unpublic google spreadsheet in PHP without using Zend Gdata lib? I can't use Zend libs, as it's shown on google tutorials, because the php server on which I'm running the script is php v. 5.0.4. I tried to find a solution using cUrl, but I can't omit the problem with authentication when doc is unpublic. How can I d...

how to make thumbnails with php

I was just wondering how I can make thumbnails of images stored in hdd and use them in an html page, also I need the thumbnails to be able to enlarge (to their original size) if clicked on preferably inside a div tag on the same page, I would appreciate if anyone could put me in the right direction thanks ...

Is there an equivalent of Apache's auto_prepend_file in IIS 6.0

On a LAMP stack I was able to use: > php_value auto_prepend_file bootstrap.php in .htaccess to bootstrap a bunch of commands that I wanted to execute before any page was ever processed. Is it possible to do the same in IIS 6.0 ? UPDATE: Not the prettiest solution, but since I have one site on this server I just added the auto_prepe...

changing form field to selected after post php

I have a form where the user selects field 1, and then selects field 2, which is populated by their choice on field 1. The problem is that after they are on step 2, field 1 is not showing their choice (even though the selection is still carried in a hidden form field. Im not sure how to do that with the way ive setup the form below. i n...

PHP Form writing to file in https://

Hiya I'm having issues getting a php form to write to a file hosted with the apache httpsdocs folder. The form works just fine if all parts of it are using the http protocol, but when I secure the form, form submission and the file the results are written to, it fails. Can anyone help? This is the php code: $myFile = "files/data.txt...

adding data into json with PHP

i used json_decode to create a json object. After going through some elements i would like to add child elements to it. How do i do this? ...

MySQL check if a table exists without throwing an exception

What is the best way to check if a table exists in MySQL (preferably via PDO in PHP) without throwing an exception. I do not feel like parsing the results of "SHOW TABLES LIKE" et cetera. There must be some sort of boolean query? ...

How do I use filesystem functions in PHP, using UTF-8 strings?

I can't use mkdir to create folders with UTF-8 characters. <?php $dir_name = "Depósito"; mkdir($dir_name ); ?> But, when I browse this folder in Windows Explorer, the folder name looks like this: Depósito What should I do? ...