|
Hello all,
I have got stuck with a question I have just been helped on - its a new problem but only just slightly.
I have this preg_match to get the contents of href. Please don't tell me not to use regex - I am aware of using other parsers/classes etc...
Started by Abs on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
echo preg_replace('/.*href="|/ms',"",$k); break; } }
output
$ php test.php http://www.example.com$string="<a target='_blank' rel='nofollow' href=\"http://www.example.com/frame2.php?view=545903&epi=54683\">"; $s = explode(....
|
|
Hello i want to extract links <a href="/portal/clients/show/entityId/2121" > and i want a regex which givs me /portal/clients/show/entityId/2121 the number at last 2121 is in other links different any idea?
Started by streetparade on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
You....
'<br />'; }
Regex for parsing links is something like this:
'/<a\s+(?:[^"'>]+|"[^"]*"|'[^']*')*href for getting the links at least.
Www.example.com'); foreach($html->find('a') as $link) { echo $link->href .
|
|
Hi. I'm trying to make a small script for my site where the user would go to the page, lets say, http://example.com/test.php?p=22 . From there, a script would read the ' p ' variable, and result with a hyperlink going to http://example.com/diffdir/22....
Started by PuppyKevin on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
<?php $test = $_GET['p']; ?> <a href="diffdir/<?php echo....
Tags:
<a href="diffdir/<? echo $test; ?>">Test</a>
$HTTP_GET_VARS is deprecated execute $test , hence, can't fill in your desired value ..
|
Ask your Facebook Friends
|
Hi there, i have the following link
<a href="example.com" id="example1"> Go to example....</a>
Is it possible that when a body moves the cursor over "Go to example..." it changes to "Go to example One" , i am using php and jquery. Any help...
Started by Ahsan on
, 7 posts
by 7 people.
Answer Snippets (Read the full thread at stackoverflow):
Lt;a href="<?php print "play/".$link;?>" title="Listen or Download <?php echo $hoverActual ?>" onmouseover="javascript:changeTo('<?php echo $hoverActual; ?>');"><?php echo link that you can address....
|
|
Do I really need this many echo's or can I make it shorter?
<?php if (!empty($url)) { echo '<p>Job: <span>' . $job .'</span></p>'; echo '<p>Skills: <span class="caps">' . $skills . '</span></p>'; echo...
Started by phpnut on
, 10 posts
by 10 people.
Answer Snippets (Read the full thread at stackoverflow):
Class=\"caps\">{$skills}</span></p>"; echo "<p>Website: <a href=\"http://{$urlYou can do all that with single echo and concatenation, which is just "." , and yes you ll need one more echo for the else....
|
|
Hello guys,
I am trying to anchor an echo value. My code is as follows;
while ($row = mysql_fetch_assoc($result)){ echo $row(['links']; }
I would like to anchor the value of echo $row['links'] in HTML.
Thanks guys.
Started by Tim on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
"'> text here </a>"; }
<?php echo($row['links']);....
$row['links'].
I think you want:
while ($row = mysql_fetch_assoc($result)){ echo "<a href='".$row['links_fetch_assoc($result)){ echo "<a href='" .
|
|
Hello
i got this thing
<? if (mysql_num_rows($say) == 1) { $a = "cicişsin!"; } elseif (mysql_num_rows($say) == 0) { $a = "<a href='javascript:LaunchPopup('a2.php','250','1');'>ciciş yap</a>"; } ?>
but i cant echo second $a.. its exits...
Started by Ronnie Chester Lynwood on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
Use backslashes, something like this:
$a = "<a href='javascript:LaunchPopup(\"a2.php\",\"250\",\"1\");'>ciciş yap</a>";
$a = "<a href=\"javascript:LaunchPopup('a2.php','250','1');\">ciciş yap</a>";
Escape the quotes....
|
|
$username = $_COOKIE['ID_my_site']; $pass = $_COOKIE['Key_my_site']; $firstName = $_COOKIE['firstName']; $lastName = $_COOKIE['lastName']; $active = $_COOKIE['active']; $email = $_COOKIE['emailAddress'];
then when using
echo "<b>Username:</b&...
Started by orange on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
If $username is not getting.
Try:
echo "Username: $username"; echo "Logout";
I see you've edited your question.
If you're using that syntax exactly, then you haven't echoed the variable at all.
|
|
I've discovered that any time I do the following:
echo '<a href="http://" title="bla">huzzah</a>';
I end up with the following being rendered to the browser:
<a href="http:///" title="bla">huzzah</a>
This is particularly annoying...
Started by Cory Dee on
, 7 posts
by 7 people.
Answer Snippets (Read the full thread at stackoverflow):
A href="http://someothersite.com">Link</a>'; echo '<a href="anotherpage.php">Some page</a>'; echo '<a href="../pageinparentdir.php">Another page</a>'; etc
edit, sinceIve never had that....
|
|
When I have a value like this in the database ("foo")
how can I echo it without any conflict with html code
notice
<input type="text" value="<? echo '"foo"'; ?>" />
the result will be like this
<input type="text" value=""foo"" />
how...
Answer Snippets (Read the full thread at stackoverflow):
Use urlencode or htmlspecialchars
<a href="<?php echo urlencode($dburl)?>" title<?php echo "<input type='text' value='{$foo}' />" ; ?>
You can use htmlentities to overcome this problem like so:
&....
With html.
|