Check for example this thread, it uses webhook to send data to PHP script. You will need to replace JSON encoding with creating CVS line in the PHP script. Say your published variable is already CSV line, like:
value1,value2,value3
Then it should be as simple as (part with . "\n" adds newline character after you data so you don't have to send it from particle):