Hi!
Is there a straightforward way of determining the number of decimal places in a(n) integer/double value in PHP? (that is, without using explode)
Thanks,
Erwin
Where keys are represented by element type and values are represented by #foo and .bar (spaced and ready for explode()). Is it possible, or does something exist for it?
I know that this question might incite some wrath, and I'm hoping nobody links to that post about parsing HTML, but I'm hoping it's not impossible. Thanks for the help.
Addendum:…
My application requires the user to enter their business name, which the application will automatically create into a unique identifier to be used in URLs, ie
"Bob's Cafe" will become "bobs-cafe"
But if there are duplicate names I would like the application to add a number so if there is already a "bobs-cafe" we will use "bobs-cafe-1" and…
After keeping in mind that HTML has both an SGML and XML serialisations, which are just encodings for a parser to "explode" into a DOM, I'm wondering whether there are other serialisations for HTML. A JSON serialisation? If so, are there any parsers for these alternative serialisations?
Hey,
My head is about to explode with this logic, can anyone help?
Class A #imports Class B.
Class A calls Method A in Class B.
This works great
Class B wants to send a response back to Class A from another method that is called from Method A. If you #import Class A from Class B, it is in effect an infinite loop and the whole thing…
I have some testcases/strings in this format:
o201_01_01a_Testing_to_see_If_this_testcases_passes:without_data
o201_01_01b_Testing_to_see_If_this_testcases_passes:data
rx01_01_03d_Testing_the_reconfiguration/Retest:
Actually this testcase name consists of the actual name and the description.
So, I want to split them like this :
…
Hi ,
Using explode i have converted the string into array ,
But the array look like
Array ( [0] = root)
But i want i make my array somthing like Array ( [root] = root)
How to make this manner..
Thanks
Hi
OK I need to figure out how to count how many numbers are in the following example.
07000000000,07000000001,07000000002,07000000003,07000000004 etc...
I have tried the following PHP functions.
explode, implode, count, foreach and for.
None of them seemed to have worked and I am really stuck now.
Any help will is…
Hello, again. I'm having more issues with my script entering info into my database.
The script below grabs a page, strips down the necessary info, then downloads the related image file. After that, it is supposed to enter the information gleaned from the URL into the database. For some reason, the script seems to iterate…
Hi
How to find my code execution time ,
Am using the below snippet,
am not happy with that ?
list ($msec, $sec) = explode(' ', microtime());
$microtime = (float)$msec + (float)$sec;
Regards
$GET = array();
$key = 'one=1';
$rule = explode('=',$key);
/* array_push($GET,$rule[0]=>$rule[1]); */
I'm looking for something like this so that:
print_r($GET);
/*output:*/ $GET[one=>1,two=>2,...]
is there a function to do this (because array_push won't work this way).
thanks!
I really like the strtotime() function, but the user manual doesn't give a complete description of the supported date formats. strtotime('dd/mm/YYYY') doesn't work, it works only with mm/dd/YYYY format.
if i have date in dd/mm/YYYY format, ho can i convert it to YYYY-mm-dd?
i can do it by using explode() function, but…
I have a form that allow users to upload files, I however need to get the file extension, which I am able to get, but not sure if I'm using the most effective solution
I can get it using the following ways
$fileInfo = pathinfo($_FILES['File']['name']);
echo $fileInfo['extension'];
$ext =…
sometext( [key] = value which content number and alphabates )
from above,i want only value part by using explode function for only one time.Is it possible.
or any other function is present in php.
I have some code that sets the lang var to the site default language.
$lg = &JFactory::getLanguage();
$lg = explode('-',$lg->_default);
$dlg = $lg[0];
if(!JRequest::getWord('lang', false ))
JRequest::setVar('lang', $dlg );
however before setting it to $dlg I would like to find…
actually its little complicated:
summary: the connection to DB is very slow.
the page rendering takes around 10 seconds but the last statement on the page is an echo and i can see its output while the page is loading in firefox (IE is same). in google chrome the output becomes visible…
Hi guys,
I'm learning Zend Framework MVC, and I have a website that is mainly static php pages. However one of the pages is using functions, etc, and I'm trying to figure out what the process is for converting this to an OOP setup.
Within the <body> I have this function (and…
Say I have a text area, user enters information exactly like styled below:
Ice cream
Chocolate
then submits this information, I want to retrieve the information EXACTLY like so:
Ice cream, Chocolate
Is this the best way to do it:
$arr = explode("\n", $var);
$arr = implode(",",…
Hi,
i am having an form for uploading an excel file like
<form enctype="multipart/form-data" action="http://localhost/joomla/Joomla_1.5.7/index.php?option=com_jumi&fileid=7" method="POST">
Please choose a file: <input name="file" type="file" id="file"…
In old mysql code, I had a query below which worked perfectly which is below:
$questioncontent = (isset($_GET['questioncontent'])) ? $_GET['questioncontent'] : '';
$searchquestion = $questioncontent;
$terms = explode(" ", $searchquestion);
$questionquery = "
SELECT…
I'm working in AutoCAD using the ObjectARX .Net API. Is there a way to either create text using lines/curves/polylines, or explode an existing text object into lines/ect? Prefereable I would like to be able to generate linework based on an exsiting AutoCAD text style.…
I have a CSV file I'm importing but am running into an issue. The data is in the format:
TEST 690, "This is a test 1, 2 and 3" ,$14.95 ,4
I need to be able to explode by the , that are not within the quotes...
hey, i have this path name from an input element interesse[angebote][flurfuerderfahrzeuge] as a string in my php var. now i need convert it somehow (with regex or explode()) so it looks like this: $_POST['interesse']['angebote']['flurfuerderfahrzeuge'] and the use…
Basically, I want to enter text into a text area, and then use them. For example
variable1:variable2@variable3
variable1:variable2@variable3
variable1:variable2@variable3
I know I could use explode to make each line into an array, and then use a foreach loop to…