• Categories
    • PHP
    • phpMyAdmin
    • PHPMailer
    • FFMpeg
    • PHPEXcel
    • PHPDoc
    • PHPUnit
    • CakePHP
    • CakePHP 2.0
    • Cake PHP 2.1
    • CakePHP Model
    • Facebook PHP SDK
    • composer-php
    • PHP 7
    • PHP GD
    All Categories
  • About

Appending data to an anchor tag

phphtml


PHP Snippet 1:

<a href="?ref=login_detail&id=<?php echo $car_id ?>">Hello</a>

PHP Snippet 2:

var_dump($_GET['id']);

PHP Snippet 3:

class Obj
{
    public function login_detail($id)
    {
        //do something with passed $id
        echo $id;
    }
}

(...)
$obj = new Obj();
$obj->login_detail($_GET['id']);

PHP Snippet 4:

class Obj
{
    public function login_detail($id)
    {
        echo $_GET['id'];
    }
}
$obj = new Obj();
$obj->login_detail();

Related Snippets

Call to undefined function openssl_decrypt

yii2 and mssql insert varbinary into model

PHP function Not Working As Expected From functions.php Include File

Laravel dosen't connect with Oracle

dockerizing Laravel + vue

How to modify CSS in a specific page of the WP admin dashboard (backend)

How to add class name to an existing tag in php

Hi, I am making a contact form thingy, and my php isn't working any reason why?

Any AWS EB Laravel route getting 404 Not Found nginx/1.16.1

Multiply each value in array using array_map function

MySQL default time format UTC or GMT?

Call to a member function fetch_field() on a non-object MySQLiDB

Pagekite error: FAIL: localhost:8080 is down

Get all WooCommerce products within own plugin

SQLSTATE[HY000]: General error: 1 table posts has no column named *

About Contact Privacy policy Terms and conditions