Topic: Programming

PHP Auto post Blogger Scripts Example 0

PHP Auto post Blogger Scripts Example

Today, We want to share with you PHP Auto post Blogger Scripts Example.In this post we will show you PHP Simple Auto post Blogger Scripts Example, hear for Auto post into Blogspot using php Source code? we will give you demo and example for implement.In this post, we will learn about PHP Automatically Auto post Content into Blogspot with an example.

PHP Auto post Blogger Scripts Example

There are the Following The simple About PHP Auto post Blogger Scripts Example Full Information With Example and source code.

As I will cover this Post with live Working example to develop wordpress to blogger auto post, so the Auto Posts on Blogspot Automatically for this example is following below.

Auto Posts on Blogspot Automatically using PHP

<?php session_start();
    $email = "[email protected]";
    $pass = "Enteryourreallypassword"; //[email protected][email protected]#$%^
    $blogID= urlencode("blogger_id"); // like 6306924319904227886

    // Do any Not changes Modify Below source Code
    if(!isset($_SESSION['sessionToken'])) {

    $live_curl = curl_init("https://www.google.com/accounts/ClientLogin?Email=$email&Passwd=$pass&service=blogger&accountType=GOOGLE");
    curl_setopt($live_curl, CURLOPT_POST,1);
    curl_setopt($live_curl, CURLOPT_FOLLOWLOCATION ,1);
    curl_setopt($live_curl, CURLOPT_HEADER,0);
    curl_setopt($live_curl, CURLOPT_RETURNTRANSFER ,1);
    $data_result = curl_exec($live_curl);
    $resultArray = curl_getinfo($live_curl);
    curl_close($live_curl);
    $my_arr = explode("=",$data_result);
    $token = $my_arr[3];
    $_SESSION['sessionToken'] = $token;
    }

    $entry = "

    <title>Auto Post Blogger With PHP Script - Pakainfo.com</title>

    

    Auto Post On Blogspot Using PHP script Example with Step By Step.

    

    ";

    $len = strlen($entry);

    $data_headers = array("Content-type: application/atom+xml","Content-Length: {$len}","Authorization: GoogleLogin auth={$_SESSION['sessionToken']}","$entry");

    $live_curl = curl_init();
    curl_setopt($live_curl, CURLOPT_URL, "https://www.blogger.com/feeds/$blogID/posts/default");
    curl_setopt($live_curl, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($live_curl, CURLOPT_TIMEOUT, 4);
    curl_setopt($live_curl, CURLOPT_HTTPHEADER, $data_headers);
    curl_setopt($live_curl, CURLOPT_FOLLOWLOCATION, 1);
    curl_setopt($live_curl, CURLOPT_UNRESTRICTED_AUTH, 1);
    curl_setopt($live_curl, CURLOPT_POST, true);
    $result = curl_exec($live_curl);
    $ERROR_CODE = curl_getinfo($live_curl);
    curl_close($live_curl);

    echo '<pre>';
    print_r($data_headers);
    var_dump($result);
    print_r($ERROR_CODE);
    exit;

    ?>

Angular 6 CRUD Operations Application Tutorials

Read :

Summary

You can also read about AngularJS, ASP.NET, VueJs, PHP.

I hope you get an idea about PHP Auto post Blogger Scripts Example.
I would like to have feedback on my Pakainfo.com blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.

Get Current login Auth user details using Laravel 5.7 0

Get Current login Auth user details using Laravel 5.7

Today, We want to share with you Get Current login Auth user details using Laravel 5.7.In this post we will show you laravel 5.6 get current user, hear for Laravel 5.5 get current login user details using Auth we will give you demo and example for implement.In this post, we will learn about PHP Laravel 5.7 get current user details with an example.

Get Current login Auth user details using Laravel 5.7

There are the Following The simple About Get Current login Auth user details using Laravel 5.7 Full Information With Example and source code.

As I will cover this Post with live Working example to develop laravel 5.7 get current user, so the some laravel auth :: user () returning null for this example is following below.

class ‘app\http\controllers\auth’ not found
Class ‘App\Http\Controllers\Auth’ not found -FatalErrorException in HomeController.php

in the top of the controller.

use Auth; 

Example 1: Using Laravel Helper:

Get Logged User Data using helper

$get_user_dtl = auth()->user();
dd($get_user_dtl->id);
dd($get_user_dtl->name);
dd($get_user_dtl->email);

Example 2: Using Facade:

you can get all the login user information using Laravel Auth facade, it will also return object of current users data.

$get_user_dtl = Auth::user();
dd($get_user_dtl->id);
dd($get_user_dtl->name);
dd($get_user_dtl->email);

Using the Auth to get current user data

use Illuminate\Support\Facades\Auth;

$id = \Auth::user()->id;
$id = Auth::id();

$user = \Auth::user();
$user = Auth::user();

Angular 6 CRUD Operations Application Tutorials

Read :

Summary

You can also read about AngularJS, ASP.NET, VueJs, PHP.

I hope you get an idea about Get Current login Auth user details using Laravel 5.7.
I would like to have feedback on my Pakainfo.com blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.

How To Create Contact Form With PHPMailer To Send Mails 0

How To Create Contact Form With PHPMailer To Send Mails

How To Create Contact Form With PHPMailer To Send Mails

In this Post We Will Explain About is How To Create Contact Form With PHPMailer To Send Mails With Example and Demo.Welcome on Pakainfo.com – Examples, The best For Learn web development Tutorials,Demo with Example! Hi Dear Friends here u can know to How to send email from contact form using PHPExample

In this post we will show you Best way to implement Creating a Simple Contact Form with PHP, hear for Contact form with PHP Mailer – PHPwith Download .we will give you demo,Source Code and examples for implement Step By Step Good Luck!.

Introduction

Every web-application or websites have Their Simple own contact page to get feedback and messages from visitor, As well as it will need site owners to improve Their Simple web-application or websites performance And Have idea about user experience. Here I am going to develop a simple contact form using HTML and send mails to Super Admins contacts with need of PHPMailer (A PHP Class).

And Then we need to Make a simple contact form with need of HTML forms and design it with some CSS work based on wer needs.You might save this file as contact.php

HTML Form

<?php 
if(isset($_GET['response']) && $_GET['response'] == 'success') {
      echo '<div class="success_msg"> Thank we for contacting us. We will get back to we soon. </div> ';
} ?>

     .success_msg {
          background-color: #fed;
          color: green;
          border: 1px solid green; 
     }

<form name="live-contact-form" method="post" action="live-contact-process.php">
<table width="450px">
</tr>
<tr>
<td valign="center">
<label for="fname">First Name *</label>
</td>
<td valign="center">

</td>
</tr>

<tr>
<td>
<label for="lname">Last Name *</label>
</td>
<td valign="center">

</td>
</tr>
<tr>
<td valign="center">
<label for="email">Email Address *</label>
</td>
<td valign="center">

</td>

</tr>
<tr>
<td valign="center">
<label for="mobile">Mobile Number</label>
</td>
<td valign="center">

</td>
</tr>
<tr>
<td valign="center">
<label for="subject">Subject</label>
</td>
<td valign="center">

</td>
</tr>
<tr>
<td valign="center">
<label for="message">Message *</label>
</td>
<td valign="center">
<textarea name="message" cols="25" rows="6"></textarea>
</td>

</tr>
<tr>
<td colspan="2" style="text-align:center">
<!-- We are  simple grateful to we for keeping this link in place. thank we. -->
 ( <a href="https://pakainfo.com">Get Help from live24ucodes tut.</a> )
</td>
</tr>
</table>
</form>

Than CSS style it with the need of CSS(Cascading Style Sheet).as well as When User simple click on Submit button, and then it will send the data’s to to `live-contact-process.php`.

PHP

Here we are going to simple handle the user step by step entered data’s and simple send it to Super Admin email address at the same time we send a simple acknowledge to the and smple particular user.

<?php
require_once("PHPMailerAutoload.php"); //here this will simple include smtp data and pop files.

if(isset($_POST['email'])) {

   $to_email = "[email protected]";

   function mydedc($error) {// wer error code can go here
        echo "We're sorry, here but there's errors data simples found with theas simple  well as form we submitted.<hr /><hr />";
        echo $error."<hr /><hr />";
        echo "here Please go back and simple fix these errors.<hr /><hr />";
        die();
   }

   //Devlopend by livu.com e validation expected data exists
   if(!isset($_POST['fname']) ||!isset($_POST['lname']) ||!isset($_POST['email']) ||!isset($_POST['mobile']) ||!isset($_POST['subject']) || !isset($_POST['message'])) {
       mydedc('We are sorry, but there simple appears to be a some problem with the form we submitted.'); 
   }

   $fname = $_POST['fname']; //Data required
   $lname = $_POST['lname']; //Data required
   $form_email = $_POST['email']; //Data required
   $mobile = $_POST['mobile']; //Data not required
   $subject = $_POST['subject']; //Data required
   $message = $_POST['message']; //Data required

   $msg_err = "";
   $email_exp = '/^[A-Za-z0-9._%-][email protected][A-Za-z0-9.-]+\.[A-Za-z]{2,4}$/';
   if(!preg_match($email_exp,$form_email)) {
       $msg_err .= 'The Email Address we entered does not appear to be valid.<hr />';
   }
   $msg_string_exp = "/^[A-Za-z .'-]+$/";
   if(!preg_match($msg_string_exp,$fname)) {
      $msg_err .= 'The USER First Name we entered does not appear to be valid.<hr />';
   }
   if(!preg_match($msg_string_exp,$lname)) {
       $msg_err .= 'The USER Last Name we entered does not appear to be valid.<hr />';
   }
   if(!preg_match($msg_string_exp,$subject)) {
      $msg_err .= 'The Last Name we entered does not simple appear to be valid.<hr />';
   }
   if(strlen($message) < 2) {
       $msg_err .= 'The Live Message we entered do not simple appear to be valid.<hr />';
   }
   if(strlen($msg_err) > 0) {
       mydedc($msg_err);
   }
   $msgbody_email = "\n\n";

   $msgbody_email .= "First Name: ".clean_string($fname)."\n";
   $msgbody_email .= "Last Name: ".clean_string($lname)."\n";
   $msgbody_email .= "Email: ".clean_string($form_email)."\n";
   $msgbody_email .= "Mobile: ".clean_string($mobile)."\n";
   $msgbody_email .= "Subject: ".clean_string($subject)."\n";
   $msgbody_email .= "Message: ".clean_string($message)."\n";

   $mail = new PHPMailer();
   $mail->isSendmail();
   $mail->setFrom($form_email, $fname.$lname);
   $mail->addAddress($to_email, 'live24u Varadha);
   $mail->Subject = $subject;
   $mail->msgHTML(file_get_contents('path/to/file/attachment-file.extension'), dirname(__FILE__));

   if (!$mail->send()) { //send the message, check for errors
      echo "Mailer Error: " . mydedc($error);
   } else {
       header('Location: contact.php?response=success'); 
   }
?>

<!--Devlopend by livu.com place wer own success html simple below -->


PHPMailer Class :

It have some extended latest features, just take simple look at here to use it effective way With Like as a CC, BCC as well as Reply-To . This is simple how we can some design a contact form with using PHP phpmailer to send emails. If We have any some queries and some doubts drop wer Message here.

Example

I hope you have Got What is php – how to send on contact form using phpmailer And how it works.I would Like to have FeadBack From My Blog(Pakainfo.com) readers.Your Valuable FeadBack,Any Question,or any Comments abaout This Article(Pakainfo.com) Are Most Always Welcome.

Laravel Return Ajax JSON Response Example 0

Laravel Return Ajax JSON Response Example

Today, We want to share with you Laravel Return Ajax JSON Response Example.In this post we will show you laravel ajax post to controller, hear for ajax response in laravel controller we will give you demo and example for implement.In this post, we will learn about laravel return view with json data with an example.

Laravel Return Ajax JSON Response Example

There are the Following The simple About Laravel Return Ajax JSON Response Example Full Information With Example and source code.

As I will cover this Post with live Working example to develop simple ajax example in laravel, so the some return view blade laravel ajax request for this example is following below.

Return ajax response in laravel

ajax response in laravel controller

<!DOCTYPE html>
<html>
<head>
    <title>Laravel Simple Ajax Request</title>
<script src="http://code.jquery.com/jquery-3.3.1.min.js">
</script>
</head>
<body>
<div class="container">
</div>
<script type="text/javascript">
    $.ajax(
    {
        url: "/getAllBodyData",
        type: 'GET',
    }).done( 
        function(data) 
        {
            $('.container').html(data.html);
        }
    );
</script>
</body>
</html>
 

Laravel controller method:

public function getAllBodyData()
{
    $title = "www.infinityknow.com";
    $view = view("ajaxView",compact('title'))->render();
    return response()->json(['html'=>$view]);
}

ajaxView.blade.php file:

<h1>{{ $title }}</h1>
<p>
<ul>
<li>laravel return view with json data</li>
<li>Handling JSON Data in Laravel 5.7</li>
<li>laravel response json with status code</li>
<li>laravel return ajax response</li>
<li>passing data from ajax to controller laravel</li>
<li>how to retrieve data from database using ajax in laravel</li>
</ul>
</p>
 

Angular 6 CRUD Operations Application Tutorials

Read :

Summary

You can also read about AngularJS, ASP.NET, VueJs, PHP.

I hope you get an idea about Laravel Return Ajax JSON Response Example.
I would like to have feedback on my Pakainfo.com blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.

Laravel cURL Send HTTP Request Example 0

Laravel cURL Send HTTP Request Example

Today, We want to share with you Laravel cURL Send HTTP Request Example.In this post we will show you cURL request in Laravel, hear for Laravel 5.7 curl request example using ixudra/curl package we will give you demo and example for implement.In this post, we will learn about Laravel PHP guzzle http client GET and POST request example with an example.

Laravel cURL Send HTTP Request Example

There are the Following The simple About Laravel cURL Send HTTP Request Example Full Information With Example and source code.

As I will cover this Post with live Working example to develop laravel 5.7 curl request, so the some php laravel curl for this example is following below.

Make GET Request

Laravel PHP http client GET request Example

$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://your_website_name.com",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_TIMEOUT => 30000,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => "GET",
    CURLOPT_HTTPHEADER => array(
        // Set Here Your Requesred Headers
        'Content-Type: application/json',
    ),
));
$results = curl_exec($curl);
$resErrors = curl_error($curl);
curl_close($curl);

if ($resErrors) {
    echo "Your cURL Error #:" . $resErrors;
} else {
    print_r(json_decode($results));
}

Crate a Laravel POST Request

Laravel PHP http client POST request Example

// Call a Post Fields Array
$message = [
    'message1' => 'Value_of_the_data',
    'message2' => 'Your_data_string',
];

$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://your_website_name.com",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 30000,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => "POST",
    CURLOPT_POSTFIELDS => json_encode($message),
    CURLOPT_HTTPHEADER => array(
        // Set here Laravel Post required headers
        "accept: */*",
        "accept-language: en-US,en;q=0.8",
        "content-type: application/json",
    ),
));

$results = curl_exec($curl);
$resErrors = curl_error($curl);

curl_close($curl);

if ($resErrors) {
    echo "Your cURL Error #:" . $resErrors;
} else {
    print_r(json_decode($results));
}

Angular 6 CRUD Operations Application Tutorials

Read :

Summary

You can also read about AngularJS, ASP.NET, VueJs, PHP.

I hope you get an idea about Laravel cURL Send HTTP Request Example.
I would like to have feedback on my Pakainfo.com blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.

Laravel Create Custom Helper Class Example 0

Laravel Create Custom Helper Class Example

Today, We want to share with you Laravel Create Custom Helper Class Example.In this post we will show you Creating a Helpers file in a Laravel App, hear for Creating your own PHP helper functions in Laravel we will give you demo and example for implement.In this post, we will learn about How To Create A Custom Helper Class In Laravel MVC with an example.

Laravel Create Custom Helper Class Example

There are the Following The simple About Laravel Create Custom Helper Class Example Full Information With Example and source code.

As I will cover this Post with live Working example to develop laravel 5.7 custom helper functions, so the create custom helper in laravel 5.7 for this example is following below.

Step : 1 Create Laravel helpers.php file

app/helpers.php

<?php

function getMemberProfile($id) {
    $data = \DB::table('users')
        ->select(\DB::raw('CONCAT(firstname, " ", lastname) as username'))
        ->where('id', $id)
        ->first();

    return $data->username;
}

Step : 2 Add app/helpers.php file in composer.json file

app/helpers.php

"autoload": {
    "classmap": [
        ...
    ],

    "psr-4": {
        "App\": "app/"
    },

    "files": [
        "app/helpers.php" //Add This Line
    ]
},

After done this then once we are run following command.

composer dump-autoload

Step : 3 Use Custom Laravel Helper In Controller

Create a Laravel Controller

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use Auth;

class HomeController extends Controller
{   
    
    public function index()
    {
        $fullprofiledetails = getMemberProfile(Auth::user()->id);
        dd($fullprofiledetails);
    }

}

Step : 4 Use Custom Laravel Helper In Blade File

Laravel Blade View Files

@extends('layouts.app')

@section('content')

<?php
    $fullprofiledetails = getMemberProfile(Auth::user()->id);
    dd($fullprofiledetails);
?>

@endsection

Angular 6 CRUD Operations Application Tutorials

Read :

Create A Custom Helper Class In Laravel MVC

Summary

You can also read about AngularJS, ASP.NET, VueJs, PHP.

I hope you get an idea about Laravel Create Custom Helper Class Example.
I would like to have feedback on my Pakainfo.com blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.

Create Custom 404 Error page in laravel Example 0

Create Custom 404 Error page in laravel Example

Today, We want to share with you Create Custom 404 Error page in laravel Example.In this post we will show you How to create custom 404 error page in Laravel, hear for Creating A Laravel 404 Page Using Custom Exception Handlers we will give you demo and example for implement.In this post, we will learn about laravel redirect if route not found with an example.

Create Custom 404 Error page in laravel Example

There are the Following The simple About Create Custom 404 Error page in laravel Example Full Information With Example and source code.

As I will cover this Post with live Working example to develop How to create custom 404 page in laravel, so the laravel 5 custom 404 for this example is following below.

step : 1 Install laravel 5.6 project

create new laravel project

composer create-project --prefer-dist laravel/laravel simplelaravelblog

step : 2 change in Handler File

app/Exceptions/Handler.php file

<?php
public function render($request, Exception $exception)
{
    if($this->isHttpException($exception))
    {
        switch ($exception->getStatusCode()) 
            {
            //here call not found
            case 404:
            return redirect()->route('notfound');
            break;

            //Laravel internal error
            case '500':
            return redirect()->route('notfound');
            break;

            default:
                return $this->renderHttpException($e);
            break;
        }
    }
    else
    {
            return parent::render($request, $exception);
    }
}

step : 3 create route

Make a Laravel Route page not found

Route::get('notpagefound', ['as' => 'notfound', 'uses' => '[email protected]']);

step : 4 create notpagefound()

app/http/ProductController.php

public function notpagefound()
{
    return view('errors.notpagefound');
}

step : 5 Laravel create 404 page

resources/views/errors folder

<!DOCTYPE html>
<html>
<head>
    <title>Page Not Found - Creating A Laravel 404 Page Using Custom Exception Handlers</title>
</head>
<body>
    <h1>Sorry, Page Not Found</h1>
    <h6>Page not found - YourWebsite.com</h6>
</body>
</html>

Angular 6 CRUD Operations Application Tutorials

Read :

Summary

You can also read about AngularJS, ASP.NET, VueJs, PHP.

I hope you get an idea about Create Custom 404 Error page in laravel Example.
I would like to have feedback on my Pakainfo.com blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.

vuejs pass multiple parameters to $http post 0

vuejs pass multiple parameters to $http post

vuejs pass multiple parameters to $http post

In this Post We Will Explain About is vuejs pass multiple parameters to $http post With Example and Demo.Welcome on Pakainfo.com – Examples, The best For Learn web development Tutorials,Demo with Example! Hi Dear Friends here u can know to vuejs pass multiple parameters Example

In this post we will show you Best way to implement How to pass url parameters to Vuejs, hear for how to pass multiple parameters in url when using vuejs with Download .we will give you demo,Source Code and examples for implement Step By Step Good Luck!.

vuejs Pass data to component from route

this.$http.get('/api/Students/'+this.$route.params.name + '/' + this.$route.params.token)

Vue passing data to POST method

this.$http.post('url', {something: "string"})
  .then ((res)=> console.log (res.body))
  .catch ((error)=> console.log(error))

Sending values with vue-resource

//set token
Vue.http.headers.common['X-CSRF-TOKEN'] = document.querySelector('#live_token').getAttribute('content');

new Vue({
    el: '#liveApp',
    data: {
        loading: false,
        newStudent: {
            student_name: '',
            student_age: '',
            stud_long_description: '',
            short_description: '',
            meta_description: '',
            category_id: '',
            is_active: ''
        }

    },

    computed: {
        errors: function() {
            for (var key in this.newStudent) {
                if ( ! this.newStudent[key]) return true;
            }
            return false;
        }
    },

    methods: {
        Create: function() {
            this.loading = true;
            var data = this.newStudent;

            // GET student request
            this.$http.post('/admin/students/store', data).then(function (results) {
                console.log('Good Luck Success!:', results.message);
                this.loading = false;
            }, function (results) {
                console.log('Error!:', results.data);
                this.loading = false;
            });

        }
    }
});

Vue $http Sending Param values

Vue.http.options.emulateJSON = true; 

new Vue({
    el: '#liveApp',
    data: {
        debug: true,
        domain: '',
        ajaxRequest: false,
        postDataResults: []
    },
    methods: {
      checkWebsite: function() {
        this.ajaxRequest = true;
        this.$http.post('https://pakainfo.com/post/check', {
              domain: this.domain
            }, function (data, status, request) {
                this.postDataResults = data;

                this.ajaxRequest = false;
            });
      }}
});

Multiple parameters for Vuex2 actions

You are Most welcome in my youtube Channel Please subscribe my channel. and give me FeedBack.
More Details……
Angularjs Example

Example

I hope you have Got What is how to pass multiple parameters in url when using vuejs And how it works.I would Like to have FeedBack From My Blog(Pakainfo.com) readers.Your Valuable FeedBack,Any Question,or any Comments about This Article(Pakainfo.com) Are Most Always Welcome.

PHP String Concatenation Example with demo 0

PHP String Concatenation Example

Today, We want to share with you PHP String Concatenation Example.In this post we will show you concatenate string in php foreach, hear for decision control structure in php we will give you demo and example for implement.In this post, we will learn about php string concatenation best practice with an example.

PHP String Concatenation Example

There are the Following The simple About PHP String Concatenation Example Full Information With Example and source code.

As I will cover this Post with live Working example to develop php concatenate string and int, so the some major append two strings for this example is following below.

Concatenation of two strings in PHP

String Concatenation using dot operator

concatenate string in php foreach

<?php
$prefix_spg = "spg_";
$spg_group = array("jaydeep","krunal","dhaval","hardik");
foreach($spg_group as $key=>$value) {
$spg_name_with_prefix[] = $prefix_spg . $spg_group[$key];
}
print "<PRE>";
print_r($spg_name_with_prefix);
print "</PRE>";
?>

Example 1 : PHP append two strings

<?php
echo   'Welcome To Pakainfo.com -  one'.'Welcome To Pakainfo.com -  Two';
?>

Example 2: Decision control structure in php

<?php
$var1 = "Welcome To Pakainfo.com -  three";
$var2 = "Welcome To Pakainfo.com four";
echo $var1.$var2;
?>

PHP Concatenation of two strings

<?php 
  
//PHP First String 
$a = 'Hello'; 
  
//PHP Second String 
$b = 'World!'; 
  
//PHP Concatenation Of String 
$c = $a.$b; 
  
// print PHP Concatenate String 
echo " $c \n"; 
?> 

PHP Concatenation Operators

<?php
    $name="Jaydeep";
    $lastName="Gondaliya";
    echo $name." ".$lastName; // Outputs Jaydeep Gondaliya
    
    $a="Hello";
    $a .= " Jaydeep!";
    echo $a; // Outputs Hello Jaydeep!
?>

Angular 6 CRUD Operations Application Tutorials

Read :

Summary

You can also read about AngularJS, ASP.NET, VueJs, PHP.

I hope you get an idea about PHP String Concatenation Example.
I would like to have feedback on my Pakainfo.com blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.

PHP Check duplicated value in array Example 0

PHP Check duplicated value in array

Today, We want to share with you PHP Check duplicated value in array.In this post we will show you php array find duplicate keys, hear for php check if array has duplicate values we will give you demo and example for implement.In this post, we will learn about avoid duplicate values in foreach php with an example.

PHP Check duplicated value in array

There are the Following The simple About PHP Check duplicated value in array Full Information With Example and source code.

As I will cover this Post with live Working example to develop php find duplicates in an array, so the php remove duplicates from string for this example is following below.

Example 1 : PHP array_unique() Function

PHP Remove duplicate values from an array:

<?php
$a=array("a"=>"jaydeep","b"=>"gondaliya","c"=>"jaydeep");
print_r(array_unique($a));
?>

output
Array ( [a] => jaydeep [b] => gondaliya )

Example 2: PHP Remove duplicate values

How to remove duplicate values from an array in PHP

array_unique() and types

<?php
$input = array(4, "4", "3", 4, 3, "3");
$result = array_unique($input);
var_dump($result);
?>

output

array(2) {
  [0] => int(4)
  [2] => string(1) "3"
}

Example 3 : Check If PHP Array Contains Duplicates

Custom Helper for Check If PHP Array Contains Duplicates

function arrayContainsDuplicate($array)  
{  
      return count($array) != count(array_unique($array));    
}  

Angular 6 CRUD Operations Application Tutorials

Read :

Summary

You can also read about AngularJS, ASP.NET, VueJs, PHP.

I hope you get an idea about PHP Check duplicated value in array.
I would like to have feedback on my Pakainfo.com blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.