How to check whether a non-assoc array is unique in PHP?
I want to know whether the array $arr has duplicate elements. ...
I want to know whether the array $arr has duplicate elements. ...
Hi guys, I am creating XML using a while loop, but now I need to prepend and append the generated XML with the XML header info and wrapper tag, but I am struggling to get it to work, here is my code, $result = mysql_query("SELECT * FROM users") or die(mysql_error()); $row = mysql_fetch_array($result); while ($row = mysql_fetch_arr...
Hi! I have a tree ful with data that are draggable (& droppable). It all works fine, but there's one problem. When more users're working on this module (with tree) and they're dragging objects around, all get mixed up. So I'm working on a solution, but I got as far as table lock in mysql. But if I do that, just one user can work on thi...
Hi all, I'm trying to find a clean way to handle fatal and critical errors (i.e. without output buffering), and I read that using HTTP headers in register_shutdown_function is impossible. The thing is, I'd like to redirect to a generic static error page when a critical error occurred (e.g.: service unavailable). How should I do ? D...
How can I prevent showing web address at the status bar while hovering a hyperlink? ...
I am using PHP and I am looking to create links within my text to other sections of the site so for example: I fell into the media industry aged 30, when David Mansfield, now on the board of Ingenious Media, gave me my first break at Thames TV. From there, I worked at the (now-defunct) Sunday Correspondent and IPC, before joining TDI, w...
hi all..i'm using jquery tabs.. i'm use tabs-1 as input form and tabs-2 as show input data... i want after submit..all value inside textfield which have been type at tabs-1 can copy into textfield at tabs-2... where part that i must modify?at form or at process page?what's code that can make it works? <script type="text/javascript"> ...
I'm learning the ropes with PDO. Here is my sql (the number of parameters that can appear in the WHERE is variable). SELECT ID, title FROM table WHERE something = ? ORDER BY :sort :dir LIMIT :start, :results Here is my code: $query = $conn->prepare($sql); ...
Hi all, If I have a class (like below) and in a function I set a variable (below:$this->example) but I havent declared the variable at the top of the class (e.g var $example;) where and how can I use this variable? I tried using it straight away in another function but it didn't work (I guess I could have made a mistake but it worked a...
How do I calculate the difference between two dates in hours? For example: day1=2006-04-12 12:30:00 day2=2006-04-14 11:30:00 In this case the result should be 47 hours. ...
I am currently working on a Prestashop site. I included a new currency and then clicked on Update Currency Rate only for the system to set my new rate equal to the default currency rate. Is it possible to change the default currency converter that Prestashop is using to something that could accommodate my own currency ...
Hai I have a select input field in multiple properties. I have to validate( empty check) this field in both JavaScript and php .My code is like "select multiple="multiple" name="frm_supply[]>" Does any one help me? ...
hello guys, i have a problem here, i m new to facebook application.. i have created facebook application iframe and with php, my problem is when a new person goes to the application canvas, it doesnt ask for authorization, i m tired of googgling, i want it like new user visits my applications canvas, it should ask for authorization that ...
I'm using SimpleXMLElement to read xml returned from a remote server. The results are then parsed with xpath like this: $result = <<<XML <DataImport2Result xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.xxx.xxx/Services/DataImport2"> <Number /> <Blocks> ...
I have some simple catalog products in Magento, so I have their SKUs & IDs. Now I want to create a Bundled product using the array elements "bundle_options" & "bundle_selections" of the Bundle Items, which are used by the Magento Admin coding in its Observer Class. Also in the Observer class, there are method calls of two functions "...
Hello all, I am trying to upload an image, put another image over it (like watermark) and save the result in the database, all using Codeigniters image_lib class. Here's the code: if ($_FILES['userfile']['error'] == 0 && $_FILES['userfile']['size'] > 0) { $uploaddir = "media/"; $fileName = $_FILES['userfile']['name']; ...
Hi, For Server Side We have copied the selenium core in the apache htdocs directory. Also our AUT is also on the same machine The machine IP address on LAN is 10.0.2.6 For Client Side We are running "java -jar selenium-server.jar" Executing the PHP file generate from Selenium IDE Test case as "php ad1_php.php" which is attached ...
Digging into the api looking for methods to translate a property of a category term I could only find methods that take a string as the param, but what happens when I have the id of the object which property I want to translate? I'd like to be able to just pass this id and get the translated string (if exists). I achieved this with a rel...
Hi guys, how can I match a block of <li>item 1</li> <li>item 2</li> no matter there is a blank line before or after the block and enclose it in <ul></ul> tags using PHP's preg_* functions. Thank you for answer ...
Hi there, I have been meaning to install ffmpeg as an extension to my php setup. So before I can install it, I need to phpize it. I installed php5-dev by sudo apt-get install php5-dev But now when I run phpize I get the following error : phpize Cannot find config.m4. Make sure that you run '/usr/bin/phpize' in the top level source di...