Your cart
  • IMG
    {{cart_item.name}}
    {{cart_item.variation_attribute_name}}: {{cart_item.variation_attribute_label}}
    {{cart_item.item_unit}}: {{ setCurrency(cart_item.price)}}
    {{ setCurrency(cart_item.price*cart_item.quantity)}}
    Invalid quantity more than stock
Total :
{{setCurrency(cart.sub_total)}}

There is no item in the cart. If you want to buy, Please click here.

ভ্যারিয়েবল ফাংশন

পিএইচপি(PHP)টিউটোরিয়াল

Created by : mamun_1
tutorial
Programming, Software and application
805
2020-10-03 12:17:22

আমরা চাইলে একটি ফাংশনকে ভ্যারিয়েবল ব্যবহার করে কল করতে পারি । এক্ষেত্রে আমরা ফাংশনটির নাম একটি ভ্যারিয়েবল এ এ্যাসাইন করি । এরপর ঐ ভ্যারিয়েবলটির () ব্যবহার করে ফাংশনটি কল করি ।

Example:

<?php

function foo() {

  echo "In foo()<br />\n";

}


function bar($arg = '')

{

  echo "In bar(); argument was '$arg'.<br />\n";

}


// This is a wrapper function around echo

function echoit($string)

{

  echo $string;

}


$func = 'foo';

$func();    // This calls foo()


$func = 'bar';

$func('test'); // This calls bar()


$func = 'echoit';

$func('test'); // This calls echoit()

?>