Jump to content

php adding inside a string


Nom Nom

Recommended Posts

I was just wondering how would you add a string in a certain point of a string. It's for my web crawler.

 

<?php

//So like, say:

$var2 = "http://domain.co.uk"

$var[0] = "href=\"/folder/\""

/* How would I add $var2 to $var[0] but in the href attribute? I normally wouldn't know what $var[0] equals until it was outputted/*

?>

 

 

Kinda hard to explain, if you need any more explaination, just ask. (:

Link to comment
https://forums.phpfreaks.com/topic/186108-php-adding-inside-a-string/
Share on other sites

It is an array, 'cos it's a web crawler. I don't know what any of the parts of the array is. I'm trying to add the domain, into the href so I can click on the link.

 

'tis hard to explain. =/

 

EDIT: well, it is like what you said, just how would I do it to the whole array?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.