Jump to content

Recommended Posts

sorry want to replace somethink use.

[code]
<?php

$x=str_replace("this_word","to_this_word",$from_this_varable);

echo $x;

?>

 

 

<?php
$contents = 'Replace me %1$s and %2$s';
$args = '$parts[0],$parts[1]';
$x=explode($args);
printf($contents, $x);
?>

 

ps. use explode/implode  your first post.

 

i might be wrong theo sorry?[/code]

Reed this please ok.

 

http://uk2.php.net/print_f

 

I did, but it wasn't much help.

 

What are your "Part" array assigned to?

 

Not quite sure what you're asking.  Anyway, I see where it's hanging up.  It doesn't seem to like me feeding multiple arguments separated by commas.  If I do

$a = $parts[0];

$b = $parts[1];

 

then printf($contents, $a, $b) it works....

 

but $args = $parts[0], $parts[1]; breaks

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.