Warning: include(.../cache/template/template63867.php): failed to open stream: No such file or directory in /home/codingta/public_html/includes/vb5/template.php on line 328 Warning: include(): Failed opening '.../cache/template/template63867.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/codingta/public_html/includes/vb5/template.php on line 328 Reading file and removing commas - Coding-Talk

Reading file and removing commas

  • Filter
  • Time
  • Show
Clear All
new posts

  • Reading file and removing commas

    Hi everyone Ive a problem that i need solving essentially i have a file that i want to read from a form using php simple enough and then to add a function to read the file line by line and remove the commas of the text file im relatively new to this and would really really appreciate the help .

    i have got this with pseudo code but putting it into action im not sure.

    PHP Code:
      read file contents into a string find first comma in that string with str_posresult in $comma while ($comma) {   remove comma from $content using substr   find first comma with str_pos   result is string without any commas 

  • #2
    It sounds like a long winded way to remove commas from a string.
    A quicker and easier way would be something like:
    PHP Code: