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
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?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.