I would like to put urls in a JSON object or array if you will then put that in with some other singular fields for JSON.
JSON-ception ( field1, field2, urls (url1, … , url4), field3)
Once I get my urls how can I POST them with other fields in my form with the JSON-ception format.
$('form').submit(function() {
var linksStr = $("#links").val();
var urls = linksStr.match(/\bhttps?:\/\/[^\s]+/gi);
})
Then how would I best traverse these in PHP.
Just create an object with all your fields and the url list, then post that via jQuery:
And as to how you traverse them in PHP: