simplest, shortest way to count capital letters in a string with php?
I am looking for the shortest, simplest and most elegant way to count the number of capital letters in a given string. ...
I am looking for the shortest, simplest and most elegant way to count the number of capital letters in a given string. ...
I'm making a data-entry web page in PHP that validates and parses data for entry into a MySQL database. There are more than 30 columns in the database that consist of MySQL SET or ENUM data. If you don't know much SQL, an ENUM datatype column can only hold one value from a collection of ENUM variables that you define when you create th...
Hi all, I'm learning php and I've got to say I've googled everywhere and I'm stuck :( My question is, in other words, how can I get new variables added to previous variables on the page? Imagine this being www.mysite.com/getvartest.php?orgvar=12345 but after submitting this form it'll go to www.mysite.com/getvartest.php?varselection=...
I am encountering a problem while extracting info from a database using php+mysql and thought it will be good if somebody here may suggest a way out. Problematic Code: $selectedProtocols=array(1,2); for($i = 0; $i<2; $i++) { $result = mysql_query("SELECT throughput FROM session where mainProtocol='$selectedProtocols[$i]'"); while(...
I have a problem with the Google Maps API only allowing 1000 features per map. In a database, I keep records of areas. Each area has associated with it a heap of KML polygon information, stored as an XML string. Each area is made up of one or more polygons. Given some user input, a handful of these areas are combined into one <Placemar...
Lets say I have a class called PageBuilder which I instantiate, send parameters to and call functions from through my index file (which acts as a front controller). There are three sub classes associated with the PageBuilder class: Head, Body and Foot, that are accessed by PageBuilder which basically abstracts them for index. So in the...
I'm writing a shopping cart in PHP, and part of its function is to calculate shipping for a given set of products. For users with Javascript enabled, I want to provide the smoothest experience possible by having an accurate shipping calculation done on the client side so that changes in the cart do not require page reloads or AJAX calls....
I need to merge 2 multidimensional arrays together to create a new array. The 2 arrays are created from $_POST and $_FILES and I need them to be associated with each other. Array #1 Array ( [0] => Array ( [0] => 123 [1] => "Title #1" [2] => "Name #1" ) [1] => Array ( [0] => 124 ...
If i have an array with hundreds of random ids (having values too) like (3=>23,2=>34,17=>670,5=>67...) how can i get an output like following via a loop ID: 3 has a value= 23 ID: 2 has a value= 34 ID: 17 has a value= 670 ID: 5 has a value= 67 I can reference the values by their IDs like echo $myArray['3']; but what if don't kn...
I have a music file having artist name or author name.I want to fetch author details by using php.Is it possible? ...
Hi all, Iam getting new window pop up by using window.open(), but need When i click button in Mozilla browser, a new pop window should open in Internet Explorer, Is it possible...... ...
Hello, Do you have any idea on how to create a chart in an Excel sheet programmatically from PHP ? I know you can invoke the Excel COM object, but the server is running on a Linux machine... I already use the excellent PHPExcel library but they do not offer the option to create charts. Thanks ! ...
I am parsing a HTML document with XPATH and I want to keep all the inner html tags. The html in question is a unordered list with many list elements. <ul id="adPoint1"><li>Business</li><li>Contract</li></ul> I am parsing the document using the following PHP code $dom = new DOMDocument(); @$dom->loadHTML($output); $this->xpath = new ...
Hello Sir, i want to know hte php coding for sending the messages to the mobile port. Help me thanks ...
after failing to login 3 times (wrong password, username), i want the browser/window/tab to be closed. how can i do this in javascript or php? and also can you give me some suggestions on what i can do to my system when user fails to login 3 times. thanks. ...
I need to get a width of text in some universal points. This calculation should take into account different widths of letters. imagettfbbox() is not an option in my case. Any other ideas? ...
I'm just getting started with PHP/MySQL, so please forgive the rather simplistic question: As a practice example, I want to create a small dbase of recipes. Each recipe has X different ingredients. The table is simple enough I think - each row represents a recipe and each column after the first(primary key) is an ingredient with a TRUE/...
My question is related to using a difference drive on a windows server to store files. The partition of the server is too small to handle a large amount of data files, and I want to use the D: drive as the file storage space. My problem is, how do I access the files when they're stored on the D: drive using php? I've tried a multitude o...
I am using SMPP with PHP for sending and receiving messages. I got this error when i am trying to send a message. what is the cause of this and how can i send a message ? thanks. pfsockopen() [function.pfsockopen]: unable to connect to sms.korewireless.com:2777 (A connection attempt failed because the connected party did not properly...
I have this function on my controller (Im using CodeIgniter) that reads the database, then produces a comma-delimited string that I feed on print() so the user can save/open the file. On development, the export of about 2000+ records takes about 20-30 seconds. The problem is, on production, the request doesn't finish/goes to a blank pa...