Im looking at trying to replace all single spacing between fields with double spacing
At present my file looks like this
3 Caxxxan Maxxxet Waxxxxe Axxxxxxy Co.Kildare
but after the double spacing, I want it to look like
3 Caxxxan Maxxxet Waxxxxe Axxxxxxy Co.Kildare
The code I have so far is
Code: <?php
$fields=file('C:UsersMikeDesktop5april.txt');
foreach($fields as $i=>$field)
{
$field=str_replace(' ',',',$field);
$field=str_replace(' ',',',$field);
$fields[$i]=$field;
}
file_put_contents('C:UsersMikeDesktoptest.txt',implode("r",$fields));
?>
Any help would be great
form variables from database help.
Hi all,I would like to have a form that gives you options based on the results of an mysql query.My example is this, say I have a mysql row with the colum name points and the result is 5. How would I
MSSQL/PHP
I am tryint to setup a webapplication developed in PHP, Apache2.0 and SQLServer2000 as backend which is running smoothly on a system in UK. I got the code and database backup from the Production
array ...
hiCode: function formatCategories($categories, $parentId){ // $navCat stores all children categories // of $parentId $navCat = array(); // expand only the categories with the same parent id
Must-Know Topics of PHP
Can you guys list the must-know topics of PHP. I am still a learner and I am trying to cover most of the important topics in PHP.
PHP & MS Access - Line Break
Hey Guys!I'm pulling records from an MS Access database and listing them using PHP and I'm running into an error that I can't seem to figure out.Please see the code below:Code: if
Converting RGB values to HEX
Code: <?PHP$file_handle = fopen("colors/rgb.csv", "r");while (!feof($file_handle) ) {$line_of_text = fgetcsv($file_handle, 1024);print $line_of_text[2] . $line_of_text[3] .
show the direct link into href
I want to display link on the page. i am fetching the data(URL) from database,actually before that i am checking if it is URL or not. if it is URL, let take an example google.com so it should take me
fwrite error
Hi All,Does anyone know what is causing the error in this code?Code: <?$errorLog_FilePath = "error_log.txt";$handle = @fopen($errorLog_FilePath,'a+');$strError =
Most basic form question ever?
Hello,I want to use this snippet to make sure the fields in a form are ok before processing it.Code: <FORM method="post">To:<input type="text"
Need help urgant
why down my code ony return one item instead of all the items selected. $arr =