PHP basit REGEX Soru

0 Cevap php

Ben bu formatta girilen verileri almak istiyorum:

John Smith
123 Fake Street
Fake City, 55555
http://website.com

ve böylece gibi değişkenlerin değerleri saklamak:

$name = 'John Smith';
$address = '123 Fake Street';
$city = 'Fake City';
$zip = '55555';
$website = 'http://website.com';

So first name will be whatever is entered on the first line address is whatever is on the second line city is whatever is entered on the third line before the comma seperator zip is whatever is on the third line after the comma and website is whatever is on the fifth line

Ben desen kurallar daha sıkı olmak istemiyorum. Birisi bu nasıl yapılabilir gösterebilir misin?

0 Cevap